Allow specifying max age for caches (#2239)

* Allow specifying max age for caches

* Evict cache entry if it's found to be stale when we call Get

* Fix bugs
This commit is contained in:
Neil Alexander 2022-03-01 16:59:52 +00:00 committed by GitHub
parent 726529fe99
commit bb2380c254
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 48 additions and 5 deletions

View file

@ -10,6 +10,7 @@ const (
ServerKeyCacheName = "server_key"
ServerKeyCacheMaxEntries = 4096
ServerKeyCacheMutable = true
ServerKeyCacheMaxAge = CacheNoMaxAge
)
// ServerKeyCache contains the subset of functions needed for