package
Version:
v0.0.0-...-48d1953
Opens a new window with list of versions in this module.
Published: Sep 4, 2013
License: GPL-3.0, BSD-3-Clause
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.
README
¶
cache2go
Golang simple object caching library with expiration capabilities.
See the test file for wroking examples.
API docs here.
Continous integration: 
Documentation
¶
Simple caching library with expiration capabilities
func Cache(key string, value interface{})
The function to be used to cache a key/value pair when expiration is not needed
Delete all keys from cache
The function to extract a value for a key that never expire
func GetXCached(key string) (ece expiringCacheEntry, err error)
Get an entry from the expiration cache and mark it for keeping alive
Delete all keys from expiraton cache
Structure that must be embeded in the objectst that must be cached with expiration.
If the expiration is not needed this can be ignored
Mark entry to be kept another expirationDuration period
The main function to cache with expiration
Source Files
¶
Click to show internal directories.
Click to hide internal directories.