Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InvalidKeyError ¶
type InvalidKeyError struct{}
InvalidKeyError returned when Get or Put are called with key which cannot be written or read
func (*InvalidKeyError) Error ¶
func (e *InvalidKeyError) Error() string
Error returns error description string
type InvalidValueError ¶
type InvalidValueError struct{}
InvalidValueError returned when Put is called with empty value
func (*InvalidValueError) Error ¶
func (e *InvalidValueError) Error() string
Error returns error description string
type PersistCache ¶
PersistCache is main structure storing objects both in-memory and on file system
func New ¶
func New(path string) (*PersistCache, error)
New loads values from cache or creates path if there's none
func (*PersistCache) Delete ¶
func (pc *PersistCache) Delete(key string) error
Delete removes element from cache and filesystem
func (*PersistCache) Get ¶
func (pc *PersistCache) Get(key string) ([]byte, error)
Get value from cache
func (*PersistCache) Objects ¶
func (pc *PersistCache) Objects() []string
Objects returns list objects stored in PersistCache
Click to show internal directories.
Click to hide internal directories.