Caching in Strapi with Strapi Middleware Cache

Most firms strive to retrieve and store data faster. It is because no one wants an application that is slow or lags. When there's a lot of data in the database, it becomes challenging to fetch data from the database swiftly, which may cause your application to lag. To avoid this, most software firms cache data.


This is a companion discussion topic for the original entry at https://strapi.io/blog/caching-in-strapi-strapi-middleware-cache?utm_campaign=Strapi%20Monthly%20NL%20&utm_medium=email&_hsmi=142653676&_hsenc=p2ANqtz--ksw5n5G9ALlAv4j6Wg3Ot-Py4FRIMZT6Q3jvtqFE4dUVHJ3IcQdtmP2ZQmquY3qn6E6P_inhER6bBB1JMo8w617v0nQ&utm_content=142653115&utm_source=hs_email

First of all, thanks for the article.
Very detailed and useful.

Secondly, is there a way to setup caching to happen after user-permissions plugin?
If a website serves paid articles, then it can’t use this middleware cache because every user requesting an article will be authenticated user. Which means every request will have an Authorization header.

The fact that this middleware runs before the user-permissions plugin doesn’t sound like a good choice in this case, unless I am missing something.