Documentation ¶ Index ¶ func DefaultDir() (string, error) func Key(parts ...string) string type Cache func New(dir string, ttl time.Duration) *Cache func (c *Cache) Get(key string) ([]byte, bool, error) func (c *Cache) Put(key string, body []byte) error type Entry Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func DefaultDir ¶ func DefaultDir() (string, error) func Key ¶ func Key(parts ...string) string Types ¶ type Cache ¶ type Cache struct { // contains filtered or unexported fields } func New ¶ func New(dir string, ttl time.Duration) *Cache func (*Cache) Get ¶ func (c *Cache) Get(key string) ([]byte, bool, error) func (*Cache) Put ¶ func (c *Cache) Put(key string, body []byte) error type Entry ¶ type Entry struct { SavedAt time.Time `json:"saved_at"` Body []byte `json:"body"` } Source Files ¶ View all Source files cache.go Click to show internal directories. Click to hide internal directories.