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

Add simple GET based caching option #85

Open
jimmythomson opened this issue Jul 23, 2021 · 0 comments
Open

Add simple GET based caching option #85

jimmythomson opened this issue Jul 23, 2021 · 0 comments

Comments

@jimmythomson
Copy link
Member

jimmythomson commented Jul 23, 2021

The response to GET requests for products, product projections, categories, product types, stores etc. should all be safely cacheable. Other GET requests such as when getting the cart, or the customer's profile, should never be cached.

We should look at implementing a basic cache allowing the user to opt in to caching various resource types through configuration options. Suggest to use node-cache as the caching engine.

There's 2 key pieces of analysis here:

  1. Identify the resources which can reasonably be cached
  2. Determine a clear and flexible way of configuring the caching options

Note: only GET requests can be cached, and should always be keyed on the auth token and all query params, so as to ensure that customer data is never leaked to another customer.

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