aboutsummaryrefslogtreecommitdiff
path: root/pkg/cache
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-06-22 19:33:07 +0200
committerMax Magorsch <arzano@gentoo.org>2020-06-22 19:33:07 +0200
commitb9d384f9d788f83c4b21b708bc5920c58efb3ce5 (patch)
tree0856ec2b5eb420f5b2a4dd86a6fcbb90508573dc /pkg/cache
parentImprove the performance of the importer (diff)
downloadarchives-b9d384f9d788f83c4b21b708bc5920c58efb3ce5.tar.gz
archives-b9d384f9d788f83c4b21b708bc5920c58efb3ce5.tar.bz2
archives-b9d384f9d788f83c4b21b708bc5920c58efb3ce5.zip
Cache pages to improve the performance
Some pages as the landing page or the lists overview page are cached now to improve the performance. Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'pkg/cache')
-rw-r--r--pkg/cache/storage.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/cache/storage.go b/pkg/cache/storage.go
new file mode 100644
index 0000000..c5b273b
--- /dev/null
+++ b/pkg/cache/storage.go
@@ -0,0 +1,15 @@
+package cache
+
+var data map[string]interface{}
+
+func Init(){
+ data = make(map[string]interface{})
+}
+
+func Put(key string, value interface{}) {
+ data[key] = value
+}
+
+func Get(key string) interface{} {
+ return data[key]
+}