Mensa-API/backup/cache/cache.go

19 lines
314 B
Go
Raw Normal View History

2024-09-15 16:57:03 +00:00
package cache
import (
"mensa/types"
)
func NewCache() *types.Cache {
cache := types.Cache{}
return &cache
}
func SetCacheData(cache *types.Cache, key string, data string, lifetime ...int64) {
cache.SetData(key, data, lifetime...)
}
func GetCacheData(cache *types.Cache) string {
return cache.GetData()
}