Documentation
¶
Index ¶
- Variables
- func ListWithKeyPrefix[T cachestore.ConsistentRecord](c *Cache, filterWithKeyPrefix T) ([]T, error)
- type Cache
- func (c *Cache) CreateOrUpdate(rt cachestore.Record, expireAfterInSec int64) (exist bool, err error)
- func (c *Cache) Dump()
- func (c *Cache) Exist(filter cachestore.Record) (bool, error)
- func (c *Cache) Get(filter cachestore.Record) (cachestore.Record, error)
- func (c *Cache) Set(rt cachestore.Record, expireAfterInSec int64) error
- func (c *Cache) Update(rt cachestore.Record) error
- type CacheConf
- type KvDbClientIf
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExpired = errors.New("expired record") ErrInvalidRecordType = errors.New("invalid record type") ErrNotFound = gorm.ErrRecordNotFound )
Functions ¶
func ListWithKeyPrefix ¶
func ListWithKeyPrefix[T cachestore.ConsistentRecord](c *Cache, filterWithKeyPrefix T) ([]T, error)
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache 结构,用于内存缓存
func (*Cache) CreateOrUpdate ¶
func (*Cache) Get ¶
func (c *Cache) Get(filter cachestore.Record) (cachestore.Record, error)
Click to show internal directories.
Click to hide internal directories.