Documentation ¶
Index ¶
- type TimedCache
- func (c *TimedCache) Clear()
- func (c *TimedCache) ContainsKey(key interface{}) bool
- func (c *TimedCache) Get(key interface{}) interface{}
- func (c *TimedCache) GetTimeValue(key interface{}) interface{}
- func (c *TimedCache) KeySet() []interface{}
- func (c *TimedCache) Put(key, value interface{})
- func (c *TimedCache) PutIfAbsent(key, value interface{}) interface{}
- func (c *TimedCache) PutTTL(key, value interface{}, ttl int64)
- func (c *TimedCache) Remove(key interface{})
- func (c *TimedCache) Size() int
- type TimedValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimedCache ¶
type TimedCache struct {
// contains filtered or unexported fields
}
func (*TimedCache) Clear ¶
func (c *TimedCache) Clear()
func (*TimedCache) ContainsKey ¶
func (c *TimedCache) ContainsKey(key interface{}) bool
func (*TimedCache) Get ¶
func (c *TimedCache) Get(key interface{}) interface{}
func (*TimedCache) GetTimeValue ¶
func (c *TimedCache) GetTimeValue(key interface{}) interface{}
func (*TimedCache) KeySet ¶
func (c *TimedCache) KeySet() []interface{}
func (*TimedCache) Put ¶
func (c *TimedCache) Put(key, value interface{})
func (*TimedCache) PutIfAbsent ¶
func (c *TimedCache) PutIfAbsent(key, value interface{}) interface{}
func (*TimedCache) PutTTL ¶
func (c *TimedCache) PutTTL(key, value interface{}, ttl int64)
func (*TimedCache) Remove ¶
func (c *TimedCache) Remove(key interface{})
func (*TimedCache) Size ¶
func (c *TimedCache) Size() int
type TimedValue ¶
type TimedValue interface { Creation() time.Time Timeout() time.Duration Value() interface{} // // Check if the value has expired // now current time to be compared with the Creation() // IsValid(now time.Time) bool }
func NewTimedValue ¶
func NewTimedValue(value interface{}, creation time.Time, timeout time.Duration) TimedValue
Click to show internal directories.
Click to hide internal directories.