cache

package
v0.0.0-...-fa598d4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetUp

func SetUp()

Types

type Adapter

type Adapter interface {
	Connect()
	Get(key string) (string, error)
	Set(key string, val string, expire int) error
}

type Cache

type Cache struct {
}

func (Cache) Get

func (c Cache) Get(key string) (string, error)

func (Cache) Set

func (c Cache) Set(key, val string, expire int) error

type Redis

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

Redis cache implement

func (Redis) Connect

func (r Redis) Connect()

Setup connection

func (Redis) Get

func (r Redis) Get(key string) (string, error)

Get from key

func (Redis) Set

func (r Redis) Set(key string, val string, expire int) error

Set value with key and expire time

Jump to

Keyboard shortcuts

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