Documentation ¶
Index ¶
- Variables
- func CacheMtime[T any](db *DB, mtime time.Time, k string, ver int, new func() (T, error)) (T, error)
- func CacheStat[T any](db *DB, f interface{ ... }, k string, ver int, new func() (T, error)) (T, error)
- func CacheTTL[T any](db *DB, ttl time.Duration, k string, ver int, new func() (T, error)) (T, error)
- func Get[T any](db *DB, k string) (T, error)
- func Put[T any](db *DB, k string, v T) error
- type CacheEntry
- type DB
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilDB = errors.New("Use of uninitialized DB") ErrStale = errors.New("Stale") )
Functions ¶
func CacheMtime ¶
Types ¶
type CacheEntry ¶
func (CacheEntry[T]) CheckMtime ¶
func (ent CacheEntry[T]) CheckMtime(mtime time.Time, ver int) bool
Click to show internal directories.
Click to hide internal directories.