diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-23 02:16:41 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-23 02:16:41 -0400 |
commit | 2b0d4a52363b8683a594066bf78786fca3ac881a (patch) | |
tree | 7b3a0f17e4e35d59600dea378179f6fbc4dda9d1 /init.go | |
parent | cd635e6c6b009d6c9d6943ea7c850ca740172b65 (diff) | |
download | getwtxt-2b0d4a52363b8683a594066bf78786fca3ac881a.tar.gz |
caching some static assets
Diffstat (limited to 'init.go')
-rw-r--r-- | init.go | 13 |
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() |