@@ -8,8 +8,6 @@ export default async function nuxtRedisCache(moduleOptions) {
8
8
9
9
const client = createClient ( options . client )
10
10
11
- const cachedHeader = options . cachedHeader === undefined ? 'X-Cache' : options . cachedHeader
12
-
13
11
client . on ( 'error' , function ( error ) {
14
12
console . log ( '\n\x1b[31m%s\x1b[0m' , '[Nuxt SSR Redis Cache]: Error: ' + error )
15
13
} )
@@ -39,8 +37,8 @@ export default async function nuxtRedisCache(moduleOptions) {
39
37
}
40
38
41
39
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' ,
44
42
)
45
43
} )
46
44
@@ -100,7 +98,6 @@ function buildOptions(moduleOptions) {
100
98
} ,
101
99
ttl : 60 * 60 ,
102
100
paths : [ ] ,
103
- cachedHeader :
104
101
cacheCleanEndpoint : {
105
102
enabled : false ,
106
103
path : '/ssr-redis-cache' ,
@@ -113,8 +110,8 @@ function buildOptions(moduleOptions) {
113
110
114
111
function isCacheable ( url , paths = [ ] , cacheControl = null ) {
115
112
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 ) ) ) )
118
115
)
119
116
}
120
117
0 commit comments