Documentation ¶
Index ¶
- type GoCache
- func (this *GoCache) Delete(key string)
- func (this *GoCache) Get(key string) ([]byte, bool)
- func (this *GoCache) Inc(key string, val int64, expireSeconds int) (int64, error)
- func (this *GoCache) Set(key string, value []byte, expireSeconds int)
- func (this *GoCache) SetIfAbsent(key string, value []byte, expireSeconds int) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoCache ¶
func New ¶
Creates a new GoCache with the given intervals defaultExpiration = 0 is never expire cleanupInterval = 0 is never attempt to clean up expired
func (*GoCache) Inc ¶
Increment the key by val (val is allowed to be negative) in most implementation expireSeconds will be from the first increment, but users should not count on that. if no value is a present it should be added. If a value is present which is not a number an error should be returned.
Click to show internal directories.
Click to hide internal directories.