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

Cache-Control header is not set in response. #87

Open
namtx opened this issue Apr 8, 2024 · 3 comments
Open

Cache-Control header is not set in response. #87

namtx opened this issue Apr 8, 2024 · 3 comments
Labels
version: Strapi 4 Issues related to the versions supported by Strapi 4

Comments

@namtx
Copy link

namtx commented Apr 8, 2024

As the title, I don't see any cache instruction headers like Cache-Control: in the API response.
my current configuration:

"rest-cache": {
    config: {
      provider: {
        name: "memory",
        options: {
          max: 32767,
          maxAge: 3600,
        },
      },
      strategy: {
        maxAge: 3600000,
        contentTypes: [
          // list of Content-Types UID to cache
          "api::category.category",
          "api::printer.printer",
          "api::supporter.supporter",
          "api::seller.seller",
        ],
        enableEtag: true,
        hitpass() {
          return false;
        },
      },
    },
}
@pinkasey
Copy link

It's very surprising to see that a REST cache plugin does not read nor respond with the Cache-Control header.

@pinkasey
Copy link

I've opened a PR (#96) to add some minimal support that would help my project.

I really hope this project it maintained.
I'm willing to work on this PR if there are comments.

@derrickmehaffy derrickmehaffy added the version: Strapi 4 Issues related to the versions supported by Strapi 4 label Sep 24, 2024
@pinkasey
Copy link

pinkasey commented Oct 2, 2024

It seems this package is not maintained.
I've forked it to @vegan-friendly/strapi-plugin-rest-cache
version 4.3.1 has this issue (and related PR) resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version: Strapi 4 Issues related to the versions supported by Strapi 4
Projects
None yet
Development

No branches or pull requests

3 participants