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

Migration of REST Cache to Strapi 5, please read and give your thoughts #97

Open
11 tasks
derrickmehaffy opened this issue Sep 24, 2024 · 3 comments
Open
11 tasks
Labels
flag: help wanted Extra attention is needed version: Strapi 5 Issues related to the versions supported by Strapi 5

Comments

@derrickmehaffy
Copy link

derrickmehaffy commented Sep 24, 2024

Hello all o/

I am Derrick, a Support Engineering Manager at Strapi and also one of the co-maintainers of this plugin. With the release of Strapi 5 I will be working with @stafyniaksacha and @Boegie19 to do some heavy rewrites to this plugin to update it to Strapi 5. There almost certainly will be some breaking changes but with that will ideally bring some new features hopefully.

Below are some things I would like to tackle during the rewrite, albeit we don't know how long this rewrite is going to take. Regardless I'll detail some of my thoughts below but would also like to hear yours.


  • Completely refactor the way we inject the caching middlewares
  • Allow for more detailed configuration on when and how the cache is busted especially for relations, components, ect
  • Possibly (maybe) allow for a way to do caching for authenticated requests
    • How this will be done is still up for some debate but ideally we could allow for caching by specific user, role, ect
  • More advanced Admin Panel integrations possibly including a "cache view" to see what data is cached, how long it's TTL is, and when/how long til that TTL expires
  • Better debugging and maybe even a "cache bust log" (possibly saved to the database, TBD)
  • Rename this package to fit more in-line with the way we would like to see the community org go
    • strapi-plugin-rest-cache -> @strapi-community/plugin-rest-cache
    • strapi-provider-rest-cache-couchbase -> @strapi-community/provider-rest-cache-couchbase
    • strapi-provider-rest-cache-memory -> @strapi-community/provider-rest-cache-memory
    • strapi-provider-rest-cache-redis -> @strapi-community/provider-rest-cache-redis
  • Add some new providers
    • elasticache
    • memcache
  • Add better cache-control header configuration
  • Signifiantly improve the documentation to make it easier to understand for novice users
  • Better handling of custom routes
  • Possibly allowing for caching the internal admin-api to increase Strapi performance even for back office tasks

And I think that's about all I had in mind so far but I'm open to hearing more community suggestions

@derrickmehaffy derrickmehaffy pinned this issue Sep 24, 2024
@derrickmehaffy derrickmehaffy changed the title Migration of this plugin to Strapi 5, please read and give your thoughts Migration of REST Cache to Strapi 5, please read and give your thoughts Sep 24, 2024
@derrickmehaffy derrickmehaffy added flag: help wanted Extra attention is needed version: Strapi 5 Issues related to the versions supported by Strapi 5 labels Sep 24, 2024
@aqumus
Copy link

aqumus commented Sep 26, 2024

@derrickmehaffy I would like to help wherever I could to get this plugin v5 released, Is there any specific action item I could pick ?

@pragmago
Copy link

Thanks for your work on this plugin. Really appreciated that for v4.

Thats a pretty ambitious plan for the rewrite. Most of these suggestions look excellent. The only use case I currently use Strapi for is to serve pretty static content that allows editors to manage the content easily.

The most important missing feature in v4 is the lack of control over the injection of the middleware. The documentation was a bit unfocused but contained all relevant info in my case.

Most of the other features proposed here are nice to have, but absolutely not required. Cache busting always worked well enough in v4 and I rarely (maybe never) ran into issues where I wanted to debug the cache. I setup the cache and it 'just worked'.

So from my perspective, I would focus on improving documentation and allowing control over the order of middleware injection.

@JensUweB
Copy link

Refactoring the way the middleware gets injected & improving documentation sounds like necessary changes.

But I need to agree about the other features. They're not really necessary and most of them should be non-breaking which means you could ship them some time later.

For me the most important point is getting this plugin working with Strapi 5 fast. This plugin is the only major thing blocking us from upgrading right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: help wanted Extra attention is needed version: Strapi 5 Issues related to the versions supported by Strapi 5
Projects
None yet
Development

No branches or pull requests

4 participants