Mensa-API/backup/cache/cache.go
2024-09-15 18:57:03 +02:00

19 lines
314 B
Go

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()
}