Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface[T any] interface { // Remember value by key. If key is exists and ttl is not expired then return value without call callback. // If key is not exists or ttl is expired then call callback and remember value by key. // Error is returned from callback if failed. Remember(key string, ttlS uint64, callback func() (T, error)) (T, error) // Clear all cache. Clear() // Forget cache value by key. Forget(key string) (T, error) // Get length of cache. Length() uint64 }
Click to show internal directories.
Click to hide internal directories.