cachex

package
v0.3.15 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 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 CacheTodo

type CacheTodo interface {
	FormatPrimary(keyPrefix string, primary any) string
	CreateUpdate(model any, callBack TodoCallback) (int64, error)
	Delete(model any, callBack TodoCallback) (int64, error)
	Select(key string, callBack SelectCallback) (any, error)
	ClearRedisPrefix(keyPrefix string)
}

type SelectCallback

type SelectCallback func(key string) (any, error)

type Store

type Store struct {
	Cache     cache.Cache
	CacheConf cache.CacheConf
}

func NewStore

func NewStore(conf cache.CacheConf) *Store

func (*Store) ClearRedisPrefix

func (s *Store) ClearRedisPrefix(keyPrefix string)

func (*Store) FormatPrimary

func (s *Store) FormatPrimary(keyPrefix string, primary any) string

type TodoCallback

type TodoCallback func(model any) (int64, error)

Jump to

Keyboard shortcuts

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