cache

package
v0.0.0-...-a894b33 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectCache

type ObjectCache interface {
	Get(key string, item interface{})

	Set(key string, item interface{}) error

	GetString(key string) (string, bool)

	SetString(key string, value string)
}

type ObjectMemCache

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

* Define a struct for RepoMem for news

func NewObjectMemCache

func NewObjectMemCache() *ObjectMemCache

Provide a method to make a new AnimalRepoSql

func NewObjectMemCacheWithTime

func NewObjectMemCacheWithTime(interval time.Duration) *ObjectMemCache

Provide a method to make a new AnimalRepoSql

func (*ObjectMemCache) Get

func (repo *ObjectMemCache) Get(key string, returnItem interface{})

* Get all of the news

func (*ObjectMemCache) GetString

func (repo *ObjectMemCache) GetString(key string) (string, bool)

func (*ObjectMemCache) Set

func (repo *ObjectMemCache) Set(key string, item interface{}) error

* Get all of the news

func (*ObjectMemCache) SetString

func (repo *ObjectMemCache) SetString(key string, value string)

* Get all of the news

type ObjectRedisCache

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

* Define a struct for RepoMem for news

func NewObjectRedisCache

func NewObjectRedisCache(redis *redis.Ring) *ObjectRedisCache

Provide a method to make a new AnimalRepoSql

func (*ObjectRedisCache) Get

func (repo *ObjectRedisCache) Get(key string, item interface{})

* Get all of the news

func (*ObjectRedisCache) GetString

func (repo *ObjectRedisCache) GetString(key string) (string, bool)

func (*ObjectRedisCache) Set

func (repo *ObjectRedisCache) Set(key string, item interface{}) error

* Get all of the news

func (*ObjectRedisCache) SetString

func (repo *ObjectRedisCache) SetString(key string, value string)

* Get all of the news

Jump to

Keyboard shortcuts

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