-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Bloodhound: Results returned when LS cache is empty. #694
Comments
Hmm so it sounds like you're looking for the ability to refetch prefetch data on-demand? Is that correct? |
Yes, that's right. On Mon, Feb 17, 2014 at 5:52 PM, Jake Harding [email protected]:
|
Alright, cool. I've seen a handful of requests for that sort of ability so I'm thinking I may prioritize it for the next release. |
Wow, great, thanks! Regarding "on-demand"; I could see this going a few ways:
I'll wait to see your implementation. On Mon, Feb 17, 2014 at 6:09 PM, Jake Harding [email protected]:
|
Instead of lowering the
ttl
of a BHprefetch
, I wanted to try allowing the user to empty the cache. At first, I naively tried clearing localStorage out from under BH, then also tried keeping a reference to the BH engine and using thePersistentStorage
public API to clear it:<button onclick='localStorage.clear();'>
<button onclick='engine.storage.clear();'>
Neither "work"; after clearing the storage, TA still displays suggestions.
I've looked through the code only a bit so far, and I'm guessing this is happening from memory (probably not flushed, although the cache itself is).
I hoped TA would cache miss, and fire another "prefetch" request. Failing a fired prefetch, I would expect 0 suggestions (empty cache, therefore no matches). I'm wondering if displaying suggestions when the cache is empty is a "bug"; or, more likely, a misunderstanding on my part? :-)
The text was updated successfully, but these errors were encountered: