Hey @crossbeau. Sorry about that timeout - it was automated. I've undone it now.
Hey @crossbeau. Sorry about that timeout - it was automated. I've undone it now.
fetch() subrequests.
wrangler deploy --var FOO:$BARcache class that uses caches.default.put to set the cached request / response.caches.default then it fetches the origin, where does the higher tier come in here? is it done automatically?caches.default (or caches.open("...")) doesn't use Tiered Cache.cache.match checks for a cached value. If it's in the cache, it returns the value, otherwise it returns null. Your Worker does all of the fetching and inserting (cache.put) into the cache itself.colo the worker is being run in, or is it checking the global cache? cache.match is actually being returned and the origin isn't being hit anyway?colo to invoke the worker, in which the worker checks the cache of that colo and if its not there it routes back to the origin to retrieve the datacolo on the east coast does not have the cache, it would retrieve it from another colo nearby that might have the cache, and if not, it would go to the origin?crypto.pbkdf2Sync is not a function when using https://www.npmjs.com/package/cryptr on workersnpm i cryptr. There are 309 other projects in the npm registry using cryptr.
nodejs_compat compatability flag https://developers.cloudflare.com/workers/runtime-apis/nodejs/crypto/ but also probably still wont work without a modification to the library because it requires crypto instead of node:cryptopbkdf2Syncis listed as supported in our implementattion of Node.js crypto
const crypto = require('crypto'); to import crypto from "node:crypto"?node: stuff is just in your wrangler.toml

node_compat = true is the old implementationcreateDecipheriv worksendpointCreate -> D1, take the created record, turn it into a response, and cache it
endpointCheck -> check `caches.default.match`, if response exists for cacheKey return endpoint response based off that cache, sync both D1 and cache via executionContext.waitUntil(update D1, update cache)wrangler deploy --var FOO:$BARname: Build
on:
push:
branches:
- main
- develop
env:
API_URL: ${{ vars.API_URL }}
CF_Access_Client_Id: ${{ vars.CF_Access_Client_Id }}
CF_Access_Client_Secret: ${{secrets.CF_Access_Client_Secret}}
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v4
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: deploy --env=${{ github.ref_name }} --experimental-json-configcaches.default.putrequest / responsecaches.defaultcaches.defaultcaches.open("...")