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

Custom key #7

Closed
pchampio opened this issue Aug 23, 2019 · 2 comments
Closed

Custom key #7

pchampio opened this issue Aug 23, 2019 · 2 comments

Comments

@pchampio
Copy link

pchampio commented Aug 23, 2019

DOC: dio-http-cache uses url as key.
Letting the user define custom keys for caching would enable users to share cache between requests.

Such a feature is interesting in the following example:
http://example.com/a/b
http://example.com/a/b?timestamp=1566563506431
http://example.com/a/b?timestamp=1566563506433
The API needs a timestamp GET parameter that cannot be shared between requests, be we would like to save them as ONE request in sqflite. (for MaxStale fallback)

The above case can also be solved by providing queryParameters at the buildCacheOptions level, where they could be ignore by the hash method.

@hurshi
Copy link
Owner

hurshi commented Aug 23, 2019

Hi,thanks for your issue,
Sorry about the confusion caused by readme, I have solved this problem in the latest version.
There was a discussion about this issue in issue6.
In the mean time, I've also updated readme.
If you have any question, please feel free to let me know.

@pchampio
Copy link
Author

Thanks!

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

2 participants