Documentation
¶
Index ¶
- Variables
- type Cache
- func (s *Cache) Clean()
- func (s *Cache) Close()
- func (s *Cache) Get(key interface{}, ref interface{}) error
- func (s *Cache) GetAndExtendExpiry(key interface{}, ref interface{}, extendExpiry bool) error
- func (s *Cache) Put(key interface{}, val interface{})
- func (s *Cache) PutWithOtherExpiry(key interface{}, val interface{}, expiry time.Duration)
- func (s *Cache) Remove(key interface{}) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotExist = errors.New("cache not exist")
)
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
Expiry time.Duration
OnExpired func(key interface{}, val interface{})
// contains filtered or unexported fields
}
func NewExtendExpiryOnGet ¶
func (*Cache) GetAndExtendExpiry ¶
func (*Cache) PutWithOtherExpiry ¶
Click to show internal directories.
Click to hide internal directories.