Skip to content

Commit

Permalink
Merge branch 'improve-cache'
Browse files Browse the repository at this point in the history
  • Loading branch information
anbsky committed Nov 29, 2024
2 parents 18fd495 + 2e1b7e4 commit f947b40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions api/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,7 @@ func defaultMiddlewares(oauthAuther auth.Authenticator, legacyProvider auth.Prov
if err != nil {
panic(err)
}
lstore, err := sturdycache.AddLocalCache(store)
if err != nil {
panic(err)
}

cache, err := query.NewQueryCacheWithInvalidator(lstore)
if err != nil {
panic(err)
}
cache := query.NewQueryCache(store)
logger.Log().Infof("cache configured: master=%s, replicas=%s", config.GetSturdyCacheMaster(), config.GetSturdyCacheReplicas())

defaultHeaders := []string{
Expand Down
2 changes: 1 addition & 1 deletion app/query/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (r CacheRequest) Expiration() time.Duration {
case MethodResolve:
return 600 * time.Second
case MethodClaimSearch:
return 300 * time.Second
return 160 * time.Second
default:
return 60 * time.Second
}
Expand Down

0 comments on commit f947b40

Please sign in to comment.