cf-workers-query
Advanced tools
Comparing version 0.6.4 to 0.6.5
@@ -0,1 +1,12 @@ | ||
## 0.6.5 (2024-09-02) | ||
### 🩹 Fixes | ||
- **create-query:** also check cached data with enabled ([30af66e](https://github.com/anymaniax/cf-workers-query/commit/30af66e)) | ||
### ❤️ Thank You | ||
- Victor Bury | ||
## 0.6.4 (2024-09-02) | ||
@@ -2,0 +13,0 @@ |
{ | ||
"name": "cf-workers-query", | ||
"version": "0.6.4", | ||
"version": "0.6.5", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Automatically cache and revalidate data in Cloudflare Workers. Using the Cache API and Execution Context", |
@@ -41,4 +41,5 @@ import { getCFExecutionContext } from './context'; | ||
if (!isStale || (isStale && context)) { | ||
console.log('cache hit with stale', isStale); | ||
return { data: cachedData.data, error: null, invalidate }; | ||
if (typeof enabled !== 'function' || enabled(cachedData.data)) { | ||
return { data: cachedData.data, error: null, invalidate }; | ||
} | ||
} | ||
@@ -45,0 +46,0 @@ } |
24819
365