cache

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppCache *c.Manager

Functions

func Add added in v0.0.5

func Add(key string, data interface{}, d time.Duration) bool

func Decrement added in v0.0.5

func Decrement(key string) bool

func Forever added in v0.0.5

func Forever(key string, data interface{}) error

func Get added in v0.0.5

func Get(key string, object interface{}) (c.Value, bool)

func Has added in v0.0.5

func Has(key string) bool

func Increment added in v0.0.5

func Increment(key string) bool

func Put added in v0.0.5

func Put(key string, data interface{}, d time.Duration) error

func Remove added in v0.0.5

func Remove(key string) bool

func Use added in v0.0.5

func Use(driver string) error

Types

type CacheConfig added in v0.0.5

type CacheConfig struct {
	Driver string `yaml:"driver" env:"CACHE_DRIVER" default:"go_cache"`
	Prefix string `yaml:"prefix" env:"CACHE_PREFIX" default:""`
}

type Service added in v0.0.5

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

func (*Service) Lifetime added in v0.0.5

func (s *Service) Lifetime(ioc container.Interface, request contracts.RequestContract)

Lifetime container callback usually register request lifetime instance to IoC-Container (per-request unique) this function will run before every request

func (*Service) Register added in v0.0.5

func (s *Service) Register(app *framework.App) error

Jump to

Keyboard shortcuts

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