refactor: lru-cache maxAge to ttl (#8039)
This commit is contained in:
@@ -64,7 +64,7 @@ class ParseLiveQueryServer {
|
||||
// The main benefit is to be able to reuse the same user / session token resolution.
|
||||
this.authCache = new LRU({
|
||||
max: 500, // 500 concurrent
|
||||
maxAge: config.cacheTimeout,
|
||||
ttl: config.cacheTimeout,
|
||||
});
|
||||
// Initialize websocket server
|
||||
this.parseWebSocketServer = new ParseWebSocketServer(
|
||||
|
||||
@@ -19,7 +19,7 @@ class SessionTokenCache {
|
||||
constructor(timeout: number = 30 * 24 * 60 * 60 * 1000, maxSize: number = 10000) {
|
||||
this.cache = new LRU({
|
||||
max: maxSize,
|
||||
maxAge: timeout,
|
||||
ttl: timeout,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user