@@ -85,6 +85,7 @@ export default defineNitroPlugin(nitroApp => {
8585 // Storage read failed (e.g., ENOENT on misconfigured storage)
8686 // Log and continue without cache
8787 if ( import . meta. dev ) {
88+ // eslint-disable-next-line no-console
8889 console . warn ( `[fetch-cache] Storage read failed for ${ url } :` , error )
8990 }
9091 }
@@ -93,13 +94,15 @@ export default defineNitroPlugin(nitroApp => {
9394 if ( ! isCacheEntryStale ( cached ) ) {
9495 // Cache hit, data is fresh
9596 if ( import . meta. dev ) {
97+ // eslint-disable-next-line no-console
9698 console . log ( `[fetch-cache] HIT (fresh): ${ url } ` )
9799 }
98100 return cached . data
99101 }
100102
101103 // Cache hit but stale - return stale data and revalidate in background
102104 if ( import . meta. dev ) {
105+ // eslint-disable-next-line no-console
103106 console . log ( `[fetch-cache] HIT (stale, revalidating): ${ url } ` )
104107 }
105108
@@ -116,10 +119,12 @@ export default defineNitroPlugin(nitroApp => {
116119 }
117120 await storage . setItem ( cacheKey , entry )
118121 if ( import . meta. dev ) {
122+ // eslint-disable-next-line no-console
119123 console . log ( `[fetch-cache] Revalidated: ${ url } ` )
120124 }
121125 } catch ( error ) {
122126 if ( import . meta. dev ) {
127+ // eslint-disable-next-line no-console
123128 console . warn ( `[fetch-cache] Revalidation failed: ${ url } ` , error )
124129 }
125130 }
@@ -131,6 +136,7 @@ export default defineNitroPlugin(nitroApp => {
131136
132137 // Cache miss - fetch and cache
133138 if ( import . meta. dev ) {
139+ // eslint-disable-next-line no-console
134140 console . log ( `[fetch-cache] MISS: ${ url } ` )
135141 }
136142
@@ -149,6 +155,7 @@ export default defineNitroPlugin(nitroApp => {
149155 } catch ( error ) {
150156 // Storage write failed - log but don't fail the request
151157 if ( import . meta. dev ) {
158+ // eslint-disable-next-line no-console
152159 console . warn ( `[fetch-cache] Storage write failed for ${ url } :` , error )
153160 }
154161 }
0 commit comments