Redis Caching in PayloadCMS v3 Beta? #9909
Replies: 4 comments
-
I've also been looking into this. The collection |
Beta Was this translation helpful? Give feedback.
-
It's ugly, but you can create your own endpoint (for example at /src/app/api/getPageData/route.tsx) and do the redis fetching in there. Hopefully an official fix is made so the native Payload |
Beta Was this translation helpful? Give feedback.
-
Do you have any progress with the redis caching for payload cms v3? |
Beta Was this translation helpful? Give feedback.
-
@thijssmudde what if we try to handle the paths within the application ourselves? Here's some sample code (not functional):
and
This will let you get information about the request and handle it before calling handleEndpoints, everything you need. |
Beta Was this translation helpful? Give feedback.
-
I’ve been digging into PayloadCMS v3 Beta and noticed that the old Redis caching plugin doesn’t seem to work anymore. Since caching is essential for performance—especially for collections and globals—I’m trying to figure out how to set it up in v3.
Has anyone managed to get Redis caching working in the new beta?
I’m guessing the changes in v3 might require a different approach than the old plugin. Anyone know what’s changed or have some tips?
Thinking about using custom hooks or middleware for caching and invalidation, but I’m not sure if that’s the best route.
What I’ve tried:
Looked at the old plugin code to see if it could be adapted for v3—no luck so far.
If anyone’s been down this road already or has any ideas, I’d love to hear from you! Bonus points for examples or links to resources that might help.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions