pachyderm: github.com/pachyderm/pachyderm/src/server/pkg/localcache Index | Files

package localcache

import "github.com/pachyderm/pachyderm/src/server/pkg/localcache"

Index

Package Files

cache.go

type Cache Uses

type Cache struct {
    // contains filtered or unexported fields
}

Cache is a simple unbounded disk cache and is safe for concurrency.

func NewCache Uses

func NewCache(root string) *Cache

NewCache creates a new cache.

func (*Cache) Clear Uses

func (c *Cache) Clear() error

Clear clears the cache.

func (*Cache) Delete Uses

func (c *Cache) Delete(key string) error

Delete deletes a key/value pair.

func (*Cache) Get Uses

func (c *Cache) Get(key string) (io.ReadCloser, error)

Get gets a key's value by returning an io.ReadCloser that should be closed when done.

func (*Cache) Keys Uses

func (c *Cache) Keys() []string

Keys returns the keys in sorted order.

func (*Cache) Put Uses

func (c *Cache) Put(key string, value io.Reader) (retErr error)

Put puts a key/value pair in the cache and reads the value from an io.Reader.

Package localcache imports 7 packages (graph) and is imported by 1 packages. Updated 2019-02-24. Refresh now. Tools for package owners.