cache

package
v0.0.0-...-93f332f Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Put(key string, value interface{})
	PutAll(map[string]interface{})
	Get(key string) interface{}
	GetAll(keys []string) map[string]interface{}
	Clean(key string)
	CleanAll()
}

func GetCachingMechanism

func GetCachingMechanism(connStr string) Cache

type LocalCache

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

func GetLocalCache

func GetLocalCache() *LocalCache

func (*LocalCache) Clean

func (c *LocalCache) Clean(key string)

func (*LocalCache) CleanAll

func (c *LocalCache) CleanAll()

func (*LocalCache) Get

func (c *LocalCache) Get(key string) interface{}

func (*LocalCache) GetAll

func (c *LocalCache) GetAll(keys []string) map[string]interface{}

func (*LocalCache) Put

func (c *LocalCache) Put(key string, value interface{})

func (*LocalCache) PutAll

func (c *LocalCache) PutAll(entries map[string]interface{})

type RedisCache

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

func GetRedisCache

func GetRedisCache(connStr string) *RedisCache

func (*RedisCache) Clean

func (rc *RedisCache) Clean(key string)

func (*RedisCache) CleanAll

func (rc *RedisCache) CleanAll()

CleanAll cleans the entire cache.

func (*RedisCache) Get

func (rc *RedisCache) Get(key string) interface{}

func (*RedisCache) GetAll

func (rc *RedisCache) GetAll(keys []string) map[string]interface{}

func (*RedisCache) Put

func (rc *RedisCache) Put(key string, value interface{})

func (*RedisCache) PutAll

func (rc *RedisCache) PutAll(entries map[string]interface{})

Jump to

Keyboard shortcuts

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