aboutsummaryrefslogtreecommitdiff
path: root/appservice
diff options
context:
space:
mode:
Diffstat (limited to 'appservice')
-rw-r--r--appservice/account.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/appservice/account.go b/appservice/account.go
index e2f2ee9..e17c425 100644
--- a/appservice/account.go
+++ b/appservice/account.go
@@ -315,3 +315,17 @@ func (a *Account) eventInternal(event *Event) error {
return nil
}
}
+
+// ----
+
+func (a *Account) CacheGet(key string) string {
+ cache_key := fmt.Sprintf("%s/account/%s/%s/%s",
+ a.Protocol, a.MatrixUser, a.AccountName, key)
+ return dbCacheGet(cache_key)
+}
+
+func (a *Account) CachePut(key string, value string) {
+ cache_key := fmt.Sprintf("%s/account/%s/%s/%s",
+ a.Protocol, a.MatrixUser, a.AccountName, key)
+ dbCachePut(cache_key, value)
+}