Documentation ¶
Overview ¶
Package cachemdl will help cache object into memory. It Uses LRU algo
Index ¶
- type CacheGCHelper
- func (gchelper *CacheGCHelper) Count() int
- func (gchelper *CacheGCHelper) Get(key string) (interface{}, error)
- func (gchelper *CacheGCHelper) GetAll() map[interface{}]interface{}
- func (gchelper *CacheGCHelper) Purge()
- func (gchelper *CacheGCHelper) Remove(key string) bool
- func (gchelper *CacheGCHelper) Set(key string, object interface{}) error
- func (gchelper *CacheGCHelper) Setup(MaxEntries int, Expiration time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheGCHelper ¶
CacheGCHelper use this to create new cache object Remember it holds memory
func (*CacheGCHelper) Get ¶
func (gchelper *CacheGCHelper) Get(key string) (interface{}, error)
Get object based on key
func (*CacheGCHelper) GetAll ¶
func (gchelper *CacheGCHelper) GetAll() map[interface{}]interface{}
GetAll objects from gc
func (*CacheGCHelper) Remove ¶
func (gchelper *CacheGCHelper) Remove(key string) bool
Remove object from GC
func (*CacheGCHelper) Set ¶
func (gchelper *CacheGCHelper) Set(key string, object interface{}) error
New Add new Key and value
func (*CacheGCHelper) Setup ¶
func (gchelper *CacheGCHelper) Setup(MaxEntries int, Expiration time.Duration)
Setup create new object of GC
Click to show internal directories.
Click to hide internal directories.