Comments (5)
Correction: POST requests are being cached at the moment yep even in server actions. I wrongly linked request memoization (which is a different feature).
The suggestion from @luismeyer should work. And in a future Next.js release POST in server actions won't be cached anymore.
from storage.
Getting the same issue when trying out the Next.js learn tutorial. Making the same INSERT or UPDATE query twice results in only one query ever executing.
from storage.
When I delete the cache directory in next it works again so it's definitely that. Maybe I should post on next github ?
from storage.
hey @smailio,
this is expected, since all fetch requests on the server are cached by Next.js by default (docs)
Ways to fix this could be:
- opt out of the data cache with
unstable_noStore
(docs) - call
revalidatePath
orrevalidateTag
to purge the cache manually (docs)
from storage.
@smailio @luismeyer From reading the docs, only GET methods are being cached in Next.js App Router ("Good to know" from https://nextjs.org/docs/app/building-your-application/caching#request-memoization).
And our database client uses POST (https://github.com/neondatabase/serverless/blob/947e5b107f3f3f9c9af1f769d3d7e63a49a43e96/export/httpQuery.ts#L162-L167). So something else is doing caching here, could it be some server action custom behavior?
from storage.
Related Issues (20)
- Progress rate of upload to Blob HOT 2
- Support for Signed URLs in Blob HOT 2
- Getting a broken image file from Blob storage HOT 2
- How to get the url by pathname? HOT 4
- Kysely Migrations fail because VercelPostgresDialect fails to report that VercelPostgres does not support transactions HOT 2
- Cannot use @vercel/blob in Edge runtime HOT 4
- Intermittent Request Failures with Vercel Postgres and Next.js HOT 6
- Vercel KV Request vs Storage Limit
- @vercel/kv Inconsistent increment behavior in Server Action HOT 5
- @vercel/postgres: Extended constant is not working HOT 5
- [vercel/blob] file should use the true mime type when uploading the file HOT 3
- Vercel KV not reachable HOT 2
- @vercel/postgres parameters bind error HOT 1
- Vercel Postgres Polling & Revalidation on Focus HOT 5
- X-Frame-Options set to DENY prevents embedding PDF blob in object, embed or iframe HOT 3
- [blob] `downloadUrl` with additional expiration token or stream HOT 2
- [Blob] No response from the server HOT 5
- Downloads blocked based on user agent? HOT 3
- Vercel Blob onBeforeGenerateToken clientPayload Type issue? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storage.