noot
This commit is contained in:
parent
61a5ad7257
commit
d51931a0e3
@ -3,6 +3,7 @@ import { c } from '#/di'
|
|||||||
import { BentoCache, bentostore } from 'bentocache'
|
import { BentoCache, bentostore } from 'bentocache'
|
||||||
import { memoryDriver } from 'bentocache/drivers/memory'
|
import { memoryDriver } from 'bentocache/drivers/memory'
|
||||||
import { redisDriver } from 'bentocache/drivers/redis'
|
import { redisDriver } from 'bentocache/drivers/redis'
|
||||||
|
import IORedis from 'ioredis'
|
||||||
|
|
||||||
c.bind({
|
c.bind({
|
||||||
provide: BentoCache,
|
provide: BentoCache,
|
||||||
@ -12,7 +13,7 @@ c.bind({
|
|||||||
defaultStore.useL1Layer(memoryDriver({ maxSize: '32mb' }))
|
defaultStore.useL1Layer(memoryDriver({ maxSize: '32mb' }))
|
||||||
if(config.REDIS_URL) {
|
if(config.REDIS_URL) {
|
||||||
defaultStore.useL2Layer(redisDriver({
|
defaultStore.useL2Layer(redisDriver({
|
||||||
connection: config.REDIS_URL,
|
connection: new IORedis(config.REDIS_URL),
|
||||||
prefix: 'wynn-bento',
|
prefix: 'wynn-bento',
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user