mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 15:05:35 +00:00
refactor: optimize favicon fetcher with cache
This commit is contained in:
10
app/lib/cache.ts
Normal file
10
app/lib/cache.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { BentoCache, bentostore } from 'bentocache';
|
||||
import { memoryDriver } from 'bentocache/drivers/memory';
|
||||
|
||||
export const cache = new BentoCache({
|
||||
default: 'cache',
|
||||
|
||||
stores: {
|
||||
cache: bentostore().useL1Layer(memoryDriver({ maxSize: 10_000 })),
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user