package
Version:
v1.5.1
Opens a new window with list of versions in this module.
Published: Apr 24, 2022
License: GPL-3.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package ttl provides a synchronised map that auto-expire
This package is simply to provide a storage for session.
Cache is a synchronised map of items that auto-expire once stale
func (c *Cache[K, V]) Delete(key K)
Delete 删除指定key
func (c *Cache[K, V]) Get(key K) (v V)
Get 通过 key 获取指定的元素
func (c *Cache[K, V]) Set(key K, val V)
Set 设置指定 key 的值
type Item[V any] struct {
}
Item represents a record in the cache map
Source Files
¶
Click to show internal directories.
Click to hide internal directories.