Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorNotFound = errors.New("no value was found with the provided key")
Functions ¶
Types ¶
type Cache ¶
type Cache[T any] struct { // contains filtered or unexported fields }
Cache is a namespaced and type-safe key-value store
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is meant to be passed around and used by the New function (which provides namespacing and type-safety)
func NewStorage ¶
NewStorage sets up the storage needed for later cache usage path is the full path (including filename) to the database file to ues It does not need to be closed as this happens automatically in each call to the cache
Click to show internal directories.
Click to hide internal directories.