File tree 2 files changed +2
-10
lines changed
2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change 27
27
prometheus :
28
28
enabled : true
29
29
path : /internal/metrics
30
- leaderElection : true
31
30
redis :
32
31
- instance : {{ redis.instance }}
33
32
access : readwrite
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import FileSystemCache from 'next/dist/server/lib/incremental-cache/file-system-
2
2
import { LRUCache } from 'lru-cache' ;
3
3
import { CacheHandlerValue } from 'next/dist/server/lib/incremental-cache' ;
4
4
import { RedisCache } from 'srcCommon/redis' ;
5
- import { isLeaderPod } from 'leader-pod' ;
6
5
import { CACHE_TTL_24_HOURS_IN_MS } from 'srcCommon/constants' ;
7
6
import { pathToCacheKey } from 'srcCommon/cache-key' ;
8
7
@@ -59,17 +58,11 @@ export default class PageCacheHandler {
59
58
60
59
public async clear ( ) {
61
60
localCache . clear ( ) ;
62
-
63
- if ( await isLeaderPod ( ) ) {
64
- return redisCache . clear ( ) ;
65
- }
61
+ return redisCache . clear ( ) ;
66
62
}
67
63
68
64
public async delete ( path : string ) {
69
65
localCache . delete ( pathToCacheKey ( path ) ) ;
70
-
71
- if ( await isLeaderPod ( ) ) {
72
- return redisCache . delete ( path ) ;
73
- }
66
+ return redisCache . delete ( path ) ;
74
67
}
75
68
}
You can’t perform that action at this time.
0 commit comments