package contract

import "time"

// CacheManager defines the main caching interface
// 	- Get methods can return domain.ErrCacheMiss
type CacheManager interface {
	GetItem(key string) ([]byte, error)
	SetItem(key string, data []byte) error

	GetString(key string) (string, error)
	SetString(key string, data string) error

	GetStruct(key string, data interface{}) error
	SetStruct(key string, data interface{}) error

	GetExpiration(key string) (time.Duration, error)
	SetExpiration(key string, expiration time.Duration) error
}
