feat: Add support for on-disk and in-memory caches with configurable duration

This commit is contained in:
Felicitas Pojtinger
2021-12-19 19:18:52 +01:00
parent 9f06a5fa4b
commit 5fd3987855
6 changed files with 115 additions and 15 deletions

17
internal/cache/check.go vendored Normal file
View File

@@ -0,0 +1,17 @@
package cache
func CheckCacheType(cacheType string) error {
cacheTypeIsKnown := false
for _, candidate := range KnownCacheTypes {
if cacheType == candidate {
cacheTypeIsKnown = true
}
}
if !cacheTypeIsKnown {
return ErrCacheTypeUnknown
}
return nil
}