Documentation ¶
Overview ¶
Package cache implements a redis-based page cache for godep.
Index ¶
- type Cache
- func (c *Cache) Clear(ctx context.Context) (err error)
- func (c *Cache) Delete(ctx context.Context, keys ...string) (err error)
- func (c *Cache) DeletePrefix(ctx context.Context, prefix string) (err error)
- func (c *Cache) Get(ctx context.Context, key string) (value []byte, err error)
- func (c *Cache) Put(ctx context.Context, key string, data []byte, ttl time.Duration) (err error)
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
}
Cache is a Redis-based cache.
func New ¶
func New(client *redis.Client) *Cache
New creates a new Cache using the given Redis client.
func (*Cache) Delete ¶
Delete deletes the given keys. It does not return an error if a key does not exist.
func (*Cache) DeletePrefix ¶
DeletePrefix deletes all keys beginning with prefix.
Click to show internal directories.
Click to hide internal directories.