File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 "md5" : " ~2.3.0" ,
3838 "openapi-factory" : " 5.4.60" ,
3939 "retry-axios" : " ~3.2.1" ,
40- "uuid" : " ~11.1.0" ,
41- "redis" : " ^5.10.0"
40+ "uuid" : " ~11.1.0"
4241 },
4342 "devDependencies" : {
4443 "@types/jest" : " ^29.5.14" ,
5251 "prettier" : " ^2.8.8" ,
5352 "ts-jest" : " ^29.4.6" ,
5453 "ts-node" : " ^10.9.2" ,
55- "typescript" : " ^5.9.3"
54+ "typescript" : " ^5.9.3" ,
55+ "redis" : " ^5.10.0"
5656 },
5757 "eslintConfig" : {
5858 "extends" : " cimpress-atsquad"
Original file line number Diff line number Diff line change 11import { buildStorage , canStale } from 'axios-cache-interceptor' ;
22import type { StorageValue } from 'axios-cache-interceptor' ;
3- import { createClient } from 'redis' ;
43
54const KEY_PREFIX = 'axios-cache-' ;
65
76const MIN_TTL = 60000 ;
87
98export default async function createRedisStorage ( redisEndpoint : string ) {
10- const client = createClient ( { url : redisEndpoint } ) ;
9+ // eslint-disable-next-line import/no-extraneous-dependencies
10+ const redis = require ( 'redis' ) ;
11+
12+ const client = redis . createClient ( { url : redisEndpoint } ) ;
1113 await client . connect ( ) ;
1214
1315 // source https://axios-cache-interceptor.js.org/guide/storages#node-redis-storage
You can’t perform that action at this time.
0 commit comments