@@ -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
114111function 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