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

Difference between "cacheKey" and "thumbprint"? #935

Open
simplenotezy opened this issue Aug 10, 2014 · 1 comment
Open

Difference between "cacheKey" and "thumbprint"? #935

simplenotezy opened this issue Aug 10, 2014 · 1 comment

Comments

@simplenotezy
Copy link

I have two questions:

1 - What is the difference? I have read the documentation, but they seem to to the same thing. https://github.com/twitter/typeahead.js/blob/master/doc/bloodhound.md#prefetch
2 - When thumbprint does not exist, it should still keep the localStorage, and ONLY replace, untill the new results have been fetched. If not, there will be an amount of seconds, where the user is unable to get any results as he type.

@jharding
Copy link
Contributor

Ha, you bring up a good point. cacheKey and thumbprint effectively provide the same functionality. The 1 difference is that if the thumbprint changes, the data stored in local storage is cleared. If the cacheKey changes, the old data will persist.

When thumbprint does not exist, it should still keep the localStorage, and ONLY replace, untill the new results have been fetched. If not, there will be an amount of seconds, where the user is unable to get any results as he type.

I'm not positive I agree with this, but it's something I'd like to put more thought into whenever myself or someone else gets around to taking a look at #934.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants