Skip to content

Commit 5608e07

Browse files
author
matus.hudec
committed
Release 7.0.4-beta
1 parent bc7a037 commit 5608e07

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
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",
@@ -52,7 +51,8 @@
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"

src/httpClient/redisStorage.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { buildStorage, canStale } from 'axios-cache-interceptor';
22
import type { StorageValue } from 'axios-cache-interceptor';
3-
import { createClient } from 'redis';
43

54
const KEY_PREFIX = 'axios-cache-';
65

76
const MIN_TTL = 60000;
87

98
export 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

0 commit comments

Comments
 (0)