Mensa-API/cache/cache.go

19 lines
314 B
Go
Raw Normal View History

2024-03-21 18:32:40 +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()
}