Documentation ¶
Index ¶
- type Cache
- func (c *Cache) ClearMemory()
- func (c *Cache) Get(ctx context.Context, lctx libkb.LRUContext, k libkb.LRUKeyer) (interface{}, error)
- func (c *Cache) OnDbNuke(mctx libkb.MetaContext) error
- func (c *Cache) OnLogout(mctx libkb.MetaContext) error
- func (c *Cache) Put(ctx context.Context, lctx libkb.LRUContext, k libkb.LRUKeyer, v interface{}) error
- type DiskLRU
- func (d *DiskLRU) Clean(ctx context.Context, lctx libkb.LRUContext, cacheDir string) (err error)
- func (d *DiskLRU) ClearMemory(ctx context.Context, lctx libkb.LRUContext)
- func (d *DiskLRU) Flush(ctx context.Context, lctx libkb.LRUContext) error
- func (d *DiskLRU) Get(ctx context.Context, lctx libkb.LRUContext, key string) (found bool, res DiskLRUEntry, err error)
- func (d *DiskLRU) MaxSize() int
- func (d *DiskLRU) Put(ctx context.Context, lctx libkb.LRUContext, key string, value interface{}) (evicted *DiskLRUEntry, err error)
- func (d *DiskLRU) Remove(ctx context.Context, lctx libkb.LRUContext, key string) (err error)
- func (d *DiskLRU) Size(ctx context.Context, lctx libkb.LRUContext) (int, error)
- type DiskLRUEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskLRU ¶ added in v1.0.46
DiskLRU maintains a cache of files on the disk in a LRU manner.
func NewDiskLRU ¶ added in v1.0.46
func (*DiskLRU) ClearMemory ¶ added in v1.0.46
func (d *DiskLRU) ClearMemory(ctx context.Context, lctx libkb.LRUContext)
func (*DiskLRU) Get ¶ added in v1.0.46
func (d *DiskLRU) Get(ctx context.Context, lctx libkb.LRUContext, key string) (found bool, res DiskLRUEntry, err error)
func (*DiskLRU) Put ¶ added in v1.0.46
func (d *DiskLRU) Put(ctx context.Context, lctx libkb.LRUContext, key string, value interface{}) (evicted *DiskLRUEntry, err error)
Click to show internal directories.
Click to hide internal directories.