Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generic ¶
type Generic interface {
Get(ctx context.Context, key string, value interface{}) (bool, error)
Set(ctx context.Context, key string, value interface{}, ttl time.Duration) error
}
func NewMemoryCache ¶
func NewMemoryCache() Generic
NewMemoryCache return an in-memory cache. This cache backend should be used to cache limited-sized entries like user group permission rule.
func NewRedisCache ¶
NewRedisCache create a redis backed cache.
Click to show internal directories.
Click to hide internal directories.