Documentation ¶ Index ¶ type Cache func New(filename, namespace string) Cache func (c *Cache) ClearAllItemsInNamespace() error func (c *Cache) ClearItem(key string) error func (c *Cache) GetItem(key string) (string, bool) func (c *Cache) SetItem(key string, content string, ttl time.Duration) type Item 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(filename, namespace string) Cache func (*Cache) ClearAllItemsInNamespace ¶ func (c *Cache) ClearAllItemsInNamespace() error func (*Cache) ClearItem ¶ func (c *Cache) ClearItem(key string) error func (*Cache) GetItem ¶ func (c *Cache) GetItem(key string) (string, bool) func (*Cache) SetItem ¶ func (c *Cache) SetItem(key string, content string, ttl time.Duration) type Item ¶ type Item struct { UpdatedAt time.Time `json:"updated_at"` ExpiresAt time.Time `json:"expires_at"` Content string `json:"content"` } Source Files ¶ View all Source files cache.go Click to show internal directories. Click to hide internal directories.