README ¶ diskcache Expand ▾ Collapse ▴ Documentation ¶ Index ¶ Variables type Cache func New(dir string, sz int64) (*Cache, error) func (c *Cache) Get(key string) (io.ReadCloser, error) func (c *Cache) Keys() []string func (c *Cache) Put(key string, data []byte) error type Item Constants ¶ This section is empty. Variables ¶ View Source var ( ErrBadDir = errors.New("invalid directory") ErrBadSize = errors.New("cache size must be greater then zero") ErrNotFound = errors.New("not found") ErrTooLarge = errors.New("file size must be less or equal cache size") ) Functions ¶ This section is empty. Types ¶ type Cache ¶ type Cache struct { // contains filtered or unexported fields } func New ¶ func New(dir string, sz int64) (*Cache, error) func (*Cache) Get ¶ func (c *Cache) Get(key string) (io.ReadCloser, error) func (*Cache) Keys ¶ func (c *Cache) Keys() []string func (*Cache) Put ¶ func (c *Cache) Put(key string, data []byte) error type Item ¶ type Item struct { Key string Size int64 Path string } Source Files ¶ View all Source files diskcache.go errors.go file.go Click to show internal directories. Click to hide internal directories.