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

Expose how cache key is computed #22

Closed
kodermax opened this issue Apr 22, 2019 · 2 comments
Closed

Expose how cache key is computed #22

kodermax opened this issue Apr 22, 2019 · 2 comments

Comments

@kodermax
Copy link

Like this kodermax@21af4bd

@Kikobeats
Copy link
Owner

Hum, that doesn't mean mobile is not supported right now 🙂

In your fork, you need to check CloudFront-Is-Mobile-Viewer and that could be different in every use case.

For example, if you have a totally independent mobile site (like m.site.com) it means the site is totally different from the non-mobile, so it's supported by default.

Another example: Just using a query parameter for differentiating it in the cache storage should be enough (like mobile=iphone).

But I'm happy to support extend the default behavior, the most obvious next step could be possible to override .getKey, then you can put your custom logic here.

Thoughts?

@Kikobeats Kikobeats changed the title Add mobile support Expose how cache key is computed Apr 22, 2019
@Kikobeats Kikobeats mentioned this issue Apr 22, 2019
@fabienheureux
Copy link

@Kikobeats this could be a great idea/solution. I ended up to stop using cacheable-response because of lack of this feature (and lack of time to find a workaround).

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

3 participants