aboutsummaryrefslogtreecommitdiff
path: root/internal/caching/caches.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/caching/caches.go')
-rw-r--r--internal/caching/caches.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/caching/caches.go b/internal/caching/caches.go
new file mode 100644
index 00000000..70f380ba
--- /dev/null
+++ b/internal/caching/caches.go
@@ -0,0 +1,15 @@
+package caching
+
+// Caches contains a set of references to caches. They may be
+// different implementations as long as they satisfy the Cache
+// interface.
+type Caches struct {
+ RoomVersions Cache // implements RoomVersionCache
+ ServerKeys Cache // implements ServerKeyCache
+}
+
+// Cache is the interface that an implementation must satisfy.
+type Cache interface {
+ Get(key string) (value interface{}, ok bool)
+ Set(key string, value interface{})
+}