mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +00:00
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:
parent
726529fe99
commit
bb2380c254
7 changed files with 48 additions and 5 deletions
|
@ -1,6 +1,8 @@
|
|||
package caching
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/matrix-org/dendrite/roomserver/types"
|
||||
)
|
||||
|
||||
|
@ -16,6 +18,7 @@ const (
|
|||
RoomInfoCacheName = "roominfo"
|
||||
RoomInfoCacheMaxEntries = 1024
|
||||
RoomInfoCacheMutable = true
|
||||
RoomInfoCacheMaxAge = time.Minute * 5
|
||||
)
|
||||
|
||||
// RoomInfosCache contains the subset of functions needed for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue