Skip to content

Commit 759771a

Browse files
fix: change how we set the TTL to match KeyV requirements and change to alpha.4
1 parent a8beb52 commit 759771a

File tree

8 files changed

+15
-24
lines changed

8 files changed

+15
-24
lines changed

lerna.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
2-
"packages": [
3-
"packages/*",
4-
"playgrounds/*"
5-
],
6-
"version": "5.0.0-alpha.2",
2+
"packages": ["packages/*", "playgrounds/*"],
3+
"version": "5.0.0-alpha.4",
74
"npmClient": "yarn"
85
}

packages/plugin-rest-cache/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@strapi-community/plugin-rest-cache",
3-
"version": "5.0.0-alpha.2",
3+
"version": "5.0.0-alpha.4",
44
"description": "Speed-up HTTP requests with LRU cache",
55
"license": "MIT",
66
"strapi": {
@@ -91,7 +91,7 @@
9191
"watch:link": "strapi-plugin watch:link"
9292
},
9393
"dependencies": {
94-
"@strapi-community/provider-rest-cache-memory": "5.0.0-alpha.2",
94+
"@strapi-community/provider-rest-cache-memory": "5.0.0-alpha.4",
9595
"react-intl": "6.6.2"
9696
},
9797
"devDependencies": {

packages/provider-rest-cache-memory/lib/MemoryCacheProvider.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ class MemoryCacheProvider extends CacheProvider {
3939
* @param {number=} maxAge
4040
*/
4141
async set(key, val, maxAge = 3600) {
42-
const options = {
43-
ttl: maxAge * 1000,
44-
};
45-
return this.cache.set(key, val, options);
42+
return this.cache.set(key, val, maxAge * 1000);
4643
}
4744

4845
/**

packages/provider-rest-cache-memory/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@strapi-community/provider-rest-cache-memory",
3-
"version": "5.0.0-alpha.2",
3+
"version": "5.0.0-alpha.4",
44
"description": "Speed-up HTTP requests with LRU cache",
55
"license": "MIT",
66
"strapi": {
@@ -76,15 +76,15 @@
7676
"quick-lru": "7.0.1"
7777
},
7878
"devDependencies": {
79-
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.2",
79+
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.4",
8080
"eslint": "^8.11.0",
8181
"eslint-config-prettier": "^8.8.0",
8282
"eslint-plugin-import": "^2.27.5",
8383
"npm-run-all": "^4.1.5",
8484
"prettier": "^2.6.0"
8585
},
8686
"peerDependencies": {
87-
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.2",
87+
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.4",
8888
"@strapi/strapi": "^5.0.0"
8989
}
9090
}

packages/provider-rest-cache-redis/lib/RedisCacheProvider.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ class RedisCacheProvider extends CacheProvider {
3535
* @param {number=} maxAge
3636
*/
3737
async set(key, val, maxAge = 3600) {
38-
const options = {
39-
ttl: maxAge * 1000,
40-
};
41-
return this.cache.set(key, val, options);
38+
return this.cache.set(key, val, maxAge * 1000);
4239
}
4340

4441
/**

packages/provider-rest-cache-redis/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@strapi-community/provider-rest-cache-redis",
3-
"version": "5.0.0-alpha.3",
3+
"version": "5.0.0-alpha.4",
44
"description": "Speed-up HTTP requests with LRU cache",
55
"license": "MIT",
66
"strapi": {
@@ -77,15 +77,15 @@
7777
},
7878
"devDependencies": {
7979
"@strapi-community/plugin-redis": "^2.0.0",
80-
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.3",
80+
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.4",
8181
"eslint": "^8.11.0",
8282
"eslint-config-prettier": "^8.8.0",
8383
"eslint-plugin-import": "^2.27.5",
8484
"npm-run-all": "^4.1.5",
8585
"prettier": "^2.6.0"
8686
},
8787
"peerDependencies": {
88-
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.3",
88+
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.4",
8989
"@strapi/strapi": "^5.0.0"
9090
}
9191
}

playgrounds/memory/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"react": "^18.0.0",
2121
"react-dom": "^18.0.0",
2222
"react-router-dom": "^6.0.0",
23-
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.2",
23+
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.4",
2424
"styled-components": "^6.0.0"
2525
},
2626
"devDependencies": {

playgrounds/redis/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"@strapi/plugin-users-permissions": "^5.18.0",
1616
"@strapi/strapi": "^5.18.0",
1717
"@strapi-community/plugin-redis": "^2.0.0",
18-
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.2",
19-
"@strapi-community/provider-rest-cache-redis": "5.0.0-alpha.2",
18+
"@strapi-community/plugin-rest-cache": "5.0.0-alpha.4",
19+
"@strapi-community/provider-rest-cache-redis": "5.0.0-alpha.4",
2020
"better-sqlite3": "11.3.0",
2121
"fs-extra": "^10.0.0",
2222
"mime-types": "^2.1.27",

0 commit comments

Comments
 (0)