Documentation
      ¶
    
    
  
    
  
    Index ¶
- func ShardInt[T constraints.Integer](v T) uint8
 - type Cache
 - type DataCache
 - func (d *DataCache) Available() int64
 - func (d *DataCache) Capacity() int64
 - func (d *DataCache) DeletePaths(ctx context.Context, paths []string)
 - func (d *DataCache) EnsureNBytes(n int)
 - func (d *DataCache) Evict(ch chan int64)
 - func (d *DataCache) Flush()
 - func (d *DataCache) Get(ctx context.Context, key query.CacheKey) (fscache.Data, bool)
 - func (d *DataCache) Set(ctx context.Context, key query.CacheKey, value fscache.Data) error
 - func (d *DataCache) Used() int64
 
- type Queue
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShardInt ¶
func ShardInt[T constraints.Integer](v T) uint8
Types ¶
type Cache ¶
type Cache[K comparable, V any] struct { // contains filtered or unexported fields }
Cache implements an in-memory cache with FIFO-based eviction it's mostly like the S3-fifo, only without the ghost queue part
func New ¶
func New[K comparable, V any]( capacity fscache.CapacityFunc, keyShardFunc func(K) uint8, postSet func(key K, value V), postGet func(key K, value V), postEvict func(key K, value V), ) *Cache[K, V]
type DataCache ¶ added in v1.2.3
type DataCache struct {
	// contains filtered or unexported fields
}
    func NewDataCache ¶ added in v1.2.3
func (*DataCache) DeletePaths ¶ added in v1.2.3
func (*DataCache) EnsureNBytes ¶ added in v1.2.3
 Click to show internal directories. 
   Click to hide internal directories.