Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data cache not functioning since 3.3.1 #75

Open
maciej-baruch opened this issue Sep 26, 2024 · 0 comments
Open

Data cache not functioning since 3.3.1 #75

maciej-baruch opened this issue Sep 26, 2024 · 0 comments

Comments

@maciej-baruch
Copy link

maciej-baruch commented Sep 26, 2024

Hey.
I noticed that my data cache stopped functioning ever since I upgraded to 3.3.3 (from 3.2). I went through the code, debugged some, did some testing by myself and I feel like I found an issue.
When an event is extended in the 'request' nitro hook, any changes introduced to the event are lost, only event.context changes persist:
image

FYI - I am doing SSR in SWR mode (no pregenaration).

Apparently Nitro might create new events through lifecycle and it won't be able to copy over keys that it is not aware of.
This might also happen in middlewares.

Would you welcome a PR that puts stuff on event.context instead of just event?

@maciej-baruch maciej-baruch changed the title Data cache not functioning since 3.3 Data cache not functioning since 3.3.1 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant