package
module
Version:
v0.0.0-...-8673ab5
Opens a new window with list of versions in this module.
Published: Jan 9, 2019
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
mem
mem is a simple and safe mem cache tool
Aims
- type safe
- race safe
- flood prevention
- high performance
- simple (KISS)
- user friendly
Documentation
¶
DefaultCache is default cache for surge
Delete is a surge, it delete a specified data in DefaultCache
Remember is a surge, it provides a quite simple way to use cache
Cache is the definition of cache, be careful of the memory usage
New create a cache entity with a custom expiration time
Delete immediately specified the cached content to expire
Remember automatically save and retrieve data from a cache entity
type CacheType interface {
GetOne(key interface{}) (interface{}, error)
}
CacheType define the type which can speed up by mem cache
Source Files
¶
Click to show internal directories.
Click to hide internal directories.