internal

package
v0.0.0-...-35d8de9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package internal is supporting code used by server.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisBlobCache

type RedisBlobCache struct {
	Prefix string // prefix to prepend to keys
}

RedisBlobCache implements caching.BlobCache using Redis.

func (*RedisBlobCache) Get

func (rc *RedisBlobCache) Get(ctx context.Context, key string) ([]byte, error)

Get returns a cached item or ErrCacheMiss if it's not in the cache.

func (*RedisBlobCache) Set

func (rc *RedisBlobCache) Set(ctx context.Context, key string, value []byte, exp time.Duration) error

Set unconditionally overwrites an item in the cache.

If 'exp' is zero, the item will have no expiration time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL