package
Version:
v0.2.4
Opens a new window with list of versions in this module.
Published: Oct 5, 2024
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package cache implements a simple in-memory cache.
An in-memory cache.
New creates a new cache and returns it.
Clear removes all cache keys.
Delete deletes an item from the cache
Exists reports wether a key exists
Get returns an item if it exits
func (c *Cache) Reorganize()
Reorganize removes all expired keys
Set stores an item in the cache.
If an item with the same key already exists it will be overwritten.
An item with timeout = 0 never expires
Source Files
¶
Click to show internal directories.
Click to hide internal directories.