File tree 2 files changed +3
-5
lines changed
2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ declare module 'fastify' {
14
14
}
15
15
16
16
export default fp ( async ( fastify , _ ) => {
17
- const store = new KeyvCacheableMemory ( { ttl : '93d' , lruSize : 5000 } ) ;
17
+ const store = new KeyvCacheableMemory ( { ttl : undefined , lruSize : 5000 } ) ;
18
18
const keyv = new Keyv ( { store } ) ;
19
19
const flatCache = new FlatCache ( {
20
20
cacheDir : path . join ( process . cwd ( ) , 'db/persistent-cache' ) ,
21
- ttl : 8035200000 , // 93 d
22
- lruSize : 10000 , // 10000 items
21
+ ttl : undefined ,
22
+ lruSize : 0 ,
23
23
persistInterval : 1000 * 10 , // 5 minutes
24
24
} ) ;
25
25
Original file line number Diff line number Diff line change @@ -587,8 +587,6 @@ const route: FastifyPluginAsyncJsonSchemaToTs = async (
587
587
588
588
if ( ! cachedData ) return reply . code ( 400 ) . send ( ) ;
589
589
590
- await fastify . cache . del ( data . id ) ;
591
-
592
590
await fastify . cache . set ( data . newId , cachedData ) ;
593
591
} catch ( error ) {
594
592
return reply . code ( 401 ) . send ( {
You can’t perform that action at this time.
0 commit comments