Documentation ¶ Index ¶ type Cache func New(globalTTL time.Duration) *Cache func (c *Cache) CleanExpiredEntries() func (c *Cache) Delete(key string) func (c *Cache) Get(key string) ([]byte, bool) func (c *Cache) Set(key string, value []byte, ttl time.Duration) type CacheEntry Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Cache ¶ type Cache struct { // contains filtered or unexported fields } func New ¶ func New(globalTTL time.Duration) *Cache func (*Cache) CleanExpiredEntries ¶ func (c *Cache) CleanExpiredEntries() func (*Cache) Delete ¶ func (c *Cache) Delete(key string) func (*Cache) Get ¶ func (c *Cache) Get(key string) ([]byte, bool) func (*Cache) Set ¶ func (c *Cache) Set(key string, value []byte, ttl time.Duration) type CacheEntry ¶ type CacheEntry struct { ExpiresAt time.Time Value []byte } Source Files ¶ View all Source files cache.go Click to show internal directories. Click to hide internal directories.