Skip to content

Commit d61400e

Browse files
GitGerbycopybara-github
authored andcommitted
Reduce cache expiration times to 5 minutes.
PiperOrigin-RevId: 698776849
1 parent bccaec0 commit d61400e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

appengine/endpoints/seed.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import (
3232
"google.golang.org/appengine"
3333
"google.golang.org/appengine/log"
3434
"google.golang.org/appengine/user"
35-
"github.com/patrickmn/go-cache"
3635
)
3736

3837
var (
@@ -221,7 +220,7 @@ func populateAllowlist(ctx context.Context) (map[string]bool, error) {
221220
if err != nil {
222221
return nil, fmt.Errorf("retrieving allowlist returned error: %v", err)
223222
}
224-
c.Set("acceptedHashes", ih, cache.DefaultExpiration)
223+
c.Set("acceptedHashes", ih, time.Duration(5*time.Minute))
225224
}
226225

227226
ah, ok := ih.(map[string]bool)

appengine/endpoints/sign.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ import (
4343
)
4444

4545
var (
46-
c = cache.New(1*time.Hour, 90*time.Minute)
47-
macRegEx = "([^0-9,a-f,A-F,:])"
46+
c = cache.New(5*time.Minute, 90*time.Minute)
47+
macRegEx = "([^0-9,a-f,A-F,:])"
4848
bucketFileFinder = bucketFileHandle
4949
)
5050

0 commit comments

Comments
 (0)