mirror of
https://github.com/ForFarmTeam/ForFarm.git
synced 2025-12-19 14:04:08 +01:00
15 lines
253 B
Go
15 lines
253 B
Go
package cache
|
|
|
|
import "time"
|
|
|
|
type Cache interface {
|
|
Get(key string) (interface{}, bool)
|
|
Set(key string, value interface{}, ttl time.Duration)
|
|
Delete(key string)
|
|
}
|
|
|
|
const (
|
|
DefaultExpiration time.Duration = 0
|
|
NoExpiration time.Duration = -1
|
|
)
|