Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
fix: reduced amount of retries by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Fifciu committed Dec 19, 2023
1 parent 72352cb commit 78d7fa6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.0.0

* feat: `redis.maxRetriesPerRequest` set to `3` by default to use renderer sooner if Redis is temporairly down

# 1.0.1

* fix: change entry point ([#3](https://github.com/vuestorefront/redis-driver/pull/3))
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/redis-cache",
"version": "1.0.1",
"version": "2.0.0",
"description": "Redis driver for the SSR cache in Vue Storefront 2",
"license": "MIT",
"main": "src/index.js",
Expand Down
13 changes: 12 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import Redis from 'redis-tag-cache';

export default function RedisCache (options) {
const defaultRedisOptions = {
maxRetriesPerRequest: 3
};

export default function RedisCache (opt) {
const options = {
...opt,
redis: {
...opt?.redis,
...defaultRedisOptions
}
};
const client = new Redis(options);

return {
Expand Down

0 comments on commit 78d7fa6

Please sign in to comment.