Documentation ¶ Index ¶ Variables type Cache func NewCache(maxBytes, targetBytes, entryOverhead int64, maxEvictPerOp int, ...) *Cache func (c *Cache) Decr(key string, delta uint64) (uint64, error) func (c *Cache) Delete(key string) bool func (c *Cache) Get(key string) (*Item, bool) func (c *Cache) Incr(key string, delta uint64) (uint64, error) func (c *Cache) Set(key string, flags uint32, value []byte) error type Item Constants ¶ This section is empty. Variables ¶ View Source var ( ErrObjectTooLarge = errors.New("object too large") ErrNoSpace = errors.New("out of memory") ErrNonNumeric = errors.New("cannot increment or decrement non-numeric value") ErrOverflow = errors.New("increment or decrement overflow") ) Functions ¶ This section is empty. Types ¶ type Cache ¶ type Cache struct { // contains filtered or unexported fields } func NewCache ¶ func NewCache(maxBytes, targetBytes, entryOverhead int64, maxEvictPerOp int, incrSlidingTTLSeconds int64) *Cache func (*Cache) Decr ¶ func (c *Cache) Decr(key string, delta uint64) (uint64, error) func (*Cache) Delete ¶ func (c *Cache) Delete(key string) bool func (*Cache) Get ¶ func (c *Cache) Get(key string) (*Item, bool) func (*Cache) Incr ¶ func (c *Cache) Incr(key string, delta uint64) (uint64, error) func (*Cache) Set ¶ func (c *Cache) Set(key string, flags uint32, value []byte) error type Item ¶ type Item struct { Value []byte Flags uint32 Size int64 CAS uint64 // ExpUnix is Unix seconds. 0 means no expiration. ExpUnix int64 } Source Files ¶ View all Source files cache.golinked_list.go Click to show internal directories. Click to hide internal directories.