about summary refs log tree commit diff stats
path: root/init.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-05-23 02:16:41 -0400
committerBen Morrison <ben@gbmor.dev>2019-05-23 02:16:41 -0400
commit2b0d4a52363b8683a594066bf78786fca3ac881a (patch)
tree7b3a0f17e4e35d59600dea378179f6fbc4dda9d1 /init.go
parentcd635e6c6b009d6c9d6943ea7c850ca740172b65 (diff)
downloadgetwtxt-2b0d4a52363b8683a594066bf78786fca3ac881a.tar.gz
caching some static assets
Diffstat (limited to 'init.go')
-rw-r--r--init.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/init.go b/init.go
index 8e7fe2f..25beeed 100644
--- a/init.go
+++ b/init.go
@@ -42,6 +42,19 @@ var twtxtCache = registry.NewIndex()
 // remote registry listing
 var remoteRegistries = &RemoteRegistries{}
 
+// static assets cache
+var staticCache = &struct {
+	index    []byte
+	indexMod time.Time
+	css      []byte
+	cssMod   time.Time
+}{
+	index:    nil,
+	indexMod: time.Time{},
+	css:      nil,
+	cssMod:   time.Time{},
+}
+
 func initGetwtxt() {
 	checkFlags()
 	titleScreen()