Skip to content

Commit fb0907b

Browse files
committed
Fix
1 parent b4041f6 commit fb0907b

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@luispittagros/nuxt-ssr-redis-cache",
3-
"version": "1.1.2",
3+
"version": "1.1.4",
44
"description": "Blazing Fast SSR page renderings using Redis.",
55
"main": "src/cache.js",
66
"author": "Luís Pitta Grós",

src/cache.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ export default async function nuxtRedisCache(moduleOptions) {
88

99
const client = createClient(options.client)
1010

11-
const cachedHeader = options.cachedHeader === undefined ? 'X-Cache' : options.cachedHeader
12-
1311
client.on('error', function (error) {
1412
console.log('\n\x1b[31m%s\x1b[0m', '[Nuxt SSR Redis Cache]: Error: ' + error)
1513
})
@@ -39,8 +37,8 @@ export default async function nuxtRedisCache(moduleOptions) {
3937
}
4038

4139
console.log(
42-
'[Nuxt SSR Redis Cache]:',
43-
'Cache clean endpoint is ' + (isCacheCleanEndpointEnabled ? 'enabled\x1b[32m ✔' : 'disabled\x1b[31m ✘') + '\n',
40+
'[Nuxt SSR Redis Cache]:',
41+
'Cache clean endpoint is ' + (isCacheCleanEndpointEnabled ? 'enabled\x1b[32m ✔' : 'disabled\x1b[31m ✘') + '\n',
4442
)
4543
})
4644

@@ -100,7 +98,6 @@ function buildOptions(moduleOptions) {
10098
},
10199
ttl: 60 * 60,
102100
paths: [],
103-
cachedHeader:
104101
cacheCleanEndpoint: {
105102
enabled: false,
106103
path: '/ssr-redis-cache',
@@ -113,8 +110,8 @@ function buildOptions(moduleOptions) {
113110

114111
function isCacheable(url, paths = [], cacheControl = null) {
115112
return (
116-
cacheControl !== 'no-cache' && cacheControl !== 'no-store'
117-
&& (!paths.length || paths.some((path) => (path instanceof RegExp ? path.test(url) : url.startsWith(path))))
113+
cacheControl !== 'no-cache' && cacheControl !== 'no-store'
114+
&& (!paths.length || paths.some((path) => (path instanceof RegExp ? path.test(url) : url.startsWith(path))))
118115
)
119116
}
120117

0 commit comments

Comments
 (0)