cf-workers-query
Advanced tools
Comparing version 0.7.1 to 0.8.0
@@ -0,1 +1,16 @@ | ||
## 0.8.0 (2025-01-02) | ||
### 🚀 Features | ||
- **create-query:** new revalidate mode probabilistic ([264b6b9](https://github.com/anymaniax/cf-workers-query/commit/264b6b9)) | ||
### 🩹 Fixes | ||
- **build:** better handling commonjs ([a0c85f1](https://github.com/anymaniax/cf-workers-query/commit/a0c85f1)) | ||
### ❤️ Thank You | ||
- Victor Bury | ||
## 0.7.1 (2024-09-26) | ||
@@ -2,0 +17,0 @@ |
{ | ||
"name": "cf-workers-query", | ||
"version": "0.7.1", | ||
"version": "0.8.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Automatically cache and revalidate data in Cloudflare Workers. Using the Cache API and Execution Context", |
@@ -38,3 +38,3 @@ # Cf-Workers-Query | ||
}); | ||
return new Response(JSON.stringify(data), { | ||
@@ -70,3 +70,3 @@ headers: { | ||
}, | ||
cacheKey: (ctx) => ['user', ctx.req.param('id')], | ||
cacheKey: (ctx) => ['user', ctx.req.param('id')], | ||
cacheTime: 60 * 60, | ||
@@ -106,2 +106,8 @@ staleTime: 60 | ||
### revalidateMode | ||
Type: default | probabilistic | ||
Description: Optional. If probabilistic if data is stale will use a probabilistic function to maybe revalidate data. Based on https://blog.cloudflare.com/sometimes-i-cache | ||
### retry | ||
@@ -108,0 +114,0 @@ Type: number | ((failureCount: number, error: Error) => boolean) |
@@ -1,3 +0,3 @@ | ||
import { Q as QueryKey } from './create-query-njGTTuc4.js'; | ||
export { C as CacheApiAdaptor, c as createQuery, d as defineCFExecutionContext, g as getCFExecutionContext } from './create-query-njGTTuc4.js'; | ||
import { Q as QueryKey } from './create-query-BP--HoKq.js'; | ||
export { C as CacheApiAdaptor, c as createQuery, d as defineCFExecutionContext, g as getCFExecutionContext } from './create-query-BP--HoKq.js'; | ||
@@ -4,0 +4,0 @@ declare const invalidateQuery: ({ queryKey, cacheName, }: { |
@@ -7,3 +7,3 @@ import { | ||
getCFExecutionContext | ||
} from "./chunk-2FX6XZNP.js"; | ||
} from "./chunk-PF5BVFLN.js"; | ||
@@ -10,0 +10,0 @@ // src/lib/invalidate-query.ts |
import { MiddlewareHandler, Handler, Context } from 'hono'; | ||
import { a as CreateQuery, Q as QueryKey } from '../create-query-njGTTuc4.js'; | ||
import { a as CreateQuery, Q as QueryKey } from '../create-query-BP--HoKq.js'; | ||
@@ -4,0 +4,0 @@ type CacheKey = QueryKey | ((ctx: Context) => QueryKey); |
import { | ||
__name, | ||
createQuery | ||
} from "../chunk-2FX6XZNP.js"; | ||
} from "../chunk-PF5BVFLN.js"; | ||
@@ -6,0 +6,0 @@ // node_modules/hono/dist/http-exception.js |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
57694
1204
134
0