From 2dd078923c7c2f6206e92664e42fd4bd2390e475 Mon Sep 17 00:00:00 2001 From: Garrett Ladley <92384606+garrettladley@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:50:44 -0400 Subject: [PATCH] db cache nits (#1019) --- backend/database/cache/cache.go | 6 +++--- backend/locals/type.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/database/cache/cache.go b/backend/database/cache/cache.go index 3529ce4b..303ddc75 100644 --- a/backend/database/cache/cache.go +++ b/backend/database/cache/cache.go @@ -185,11 +185,11 @@ func (c *Caches) storeInCache(db *gorm.DB, identifier string, ttl time.Duration) type key byte const ( - useCacheKey key = 0 - cacheTTLKey key = 1 + useCacheKey key = iota + cacheTTLKey ) -type queryType int +type queryType byte const ( uponQuery queryType = iota diff --git a/backend/locals/type.go b/backend/locals/type.go index bd23fa17..c352aad9 100644 --- a/backend/locals/type.go +++ b/backend/locals/type.go @@ -3,5 +3,5 @@ package locals type localsKey byte const ( - userKey localsKey = 0 + userKey localsKey = iota )