Documentation
¶
Index ¶
- type LRU
- func (l *LRU) Add(ctx context.Context, k entcache.Key, e *entcache.Entry, ttl time.Duration) error
- func (l *LRU) Del(ctx context.Context, k entcache.Key) error
- func (l *LRU) Get(ctx context.Context, k entcache.Key) (*entcache.Entry, error)
- func (l *LRU) LockOrWait(ctx context.Context, k entcache.Key) (bool, func(context.Context) (*entcache.Entry, error), func(context.Context), ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LRU ¶
type LRU struct {
// contains filtered or unexported fields
}
LRU provides a thread-safe LRU cache using hashicorp/golang-lru/v2.
func New ¶
New creates a new LRU cache level. If maxEntries <= 0, a default capacity of 1000 is used.
Click to show internal directories.
Click to hide internal directories.