cache.go 361 B

1234567891011121314151617
  1. package cache
  2. // CacheStatus return status of chache
  3. type CacheStatus struct {
  4. Gets int64
  5. Hits int64
  6. MaxItemSize int
  7. CurrentSize int
  8. }
  9. // Cache this is a interface which defines some common functions
  10. type Cache interface {
  11. Set(key string, value interface{})
  12. Get(key string) (interface{}, bool)
  13. Delete(key string)
  14. Status() *CacheStatus
  15. }