summaryrefslogtreecommitdiff
path: root/internal/cache/cache.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-03-09 17:03:40 +0100
committerLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-03-09 17:03:40 +0100
commit9a79d176c91de59a409d06efc8837c1d8f38b5c0 (patch)
treef4582b8eb2f57cfa356b593420308a462a2811db /internal/cache/cache.go
parentadd note struct (diff)
downloadgotosocial-9a79d176c91de59a409d06efc8837c1d8f38b5c0.tar.xz
moving stuff around, stubbing interfaces
Diffstat (limited to 'internal/cache/cache.go')
-rw-r--r--internal/cache/cache.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/cache/cache.go b/internal/cache/cache.go
index 4bef60642..ed13aded4 100644
--- a/internal/cache/cache.go
+++ b/internal/cache/cache.go
@@ -17,3 +17,9 @@
*/
package cache
+
+// Cache defines an in-memory cache that is safe to be wiped when the application is restarted
+type Cache interface {
+ Store(k string, v interface{}) error
+ Fetch(k string) (interface{}, error)
+}