mirror of
https://github.com/LeRoid-hub/Mensa-API.git
synced 2025-01-31 11:44:55 +00:00
19 lines
314 B
Go
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()
|
|
}
|