summaryrefslogtreecommitdiff
path: root/internal/web/etag.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-01-29 16:57:04 +0100
committerLibravatar GitHub <noreply@github.com>2025-01-29 16:57:04 +0100
commitd16e4fa34df222e08968b060d40aaf6b6ebeb912 (patch)
tree76fa8e3d1e1b6b47e9a0c34fe523e53edec8d2b7 /internal/web/etag.go
parent[chore] remove type switch in Create() and instead move to FederatedCallbacks... (diff)
downloadgotosocial-d16e4fa34df222e08968b060d40aaf6b6ebeb912.tar.xz
[feature] Use maintenance router to serve 503 while server is starting/migrating (#3705)
* [feature] Use maintenance router to serve 503 while server is starting/migrating * love you linter, kissies
Diffstat (limited to 'internal/web/etag.go')
-rw-r--r--internal/web/etag.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/web/etag.go b/internal/web/etag.go
index a87d9fa3b..88779871c 100644
--- a/internal/web/etag.go
+++ b/internal/web/etag.go
@@ -29,6 +29,10 @@ import (
"codeberg.org/gruf/go-cache/v3"
)
+type withETagCache interface {
+ ETagCache() cache.Cache[string, eTagCacheEntry]
+}
+
func newETagCache() cache.TTLCache[string, eTagCacheEntry] {
eTagCache := cache.NewTTL[string, eTagCacheEntry](0, 1000, 0)
eTagCache.SetTTL(time.Hour, false)