summaryrefslogtreecommitdiff
path: root/types/cache.go
diff options
context:
space:
mode:
Diffstat (limited to 'types/cache.go')
-rw-r--r--types/cache.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/types/cache.go b/types/cache.go
new file mode 100644
index 0000000..497151e
--- /dev/null
+++ b/types/cache.go
@@ -0,0 +1,20 @@
+package types
+
+import (
+ "sync"
+ "time"
+
+ "github.com/gofiber/fiber/v2"
+)
+
+type FolderCacheEntry struct {
+ Folders []fiber.Map
+ CachedAt time.Time
+ ExpiresAt time.Time
+}
+
+type FolderCache struct {
+ Mu sync.RWMutex
+ Data map[string]*FolderCacheEntry
+ TTL time.Duration
+}