cache

package
v1.0.1-0...-497af47 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: CC-BY-SA-4.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Memory Option
	Memory = cache.Options{}

	// File Option
	File = cache.Options{
		Adapter:       "file",
		AdapterConfig: conf.Cfg.Section("").Key("cache_adpter_config").Value(),
	}

	// Redis Option
	Redis = cache.Options{
		Adapter:       "redis",
		AdapterConfig: conf.Cfg.Section("").Key("cache_adpter_config").Value(),
	}

	// Memcache Option
	Memcache = cache.Options{
		Adapter:       "memcache",
		AdapterConfig: conf.Cfg.Section("").Key("cache_adpter_config").Value(),
	}
)

Functions

func GetFloatValueFromCache

func GetFloatValueFromCache(key string) (retorno float64)

GetFloatValueFromCache gets an float value from the system's cache

func GetIntValueFromCache

func GetIntValueFromCache(key string) (retorno int)

GetIntValueFromCache gets an int value from the system's cache

func GetStringValueFromCache

func GetStringValueFromCache(key string) (retorno string)

GetStringValueFromCache gets an string value from the system's cache

func GetValueFromCache

func GetValueFromCache(key string) interface{}

GetValueFromCache gets a value from the system's cache

func Option

func Option(typ string) cache.Options

Option cache selector

func PutIntoCache

func PutIntoCache(key string, value interface{})

PutIntoCache puts a value at system's cache

func PutIntoCacheWithTimeout

func PutIntoCacheWithTimeout(key string, timeoutInSeconds int, value interface{}) error

PutIntoCache puts a value at system's cache

func RemoveFromCache

func RemoveFromCache(key string)

RemoveFromCache removes an item from cache

Types

This section is empty.

Jump to

Keyboard shortcuts

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