question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BloodHound ignoring TTL on prefetch

See original GitHub issue

We are experiencing an issue with bloodhound’s cache, which is not refreshed after the suggested TTL. even at the low settings below:

var users = new Bloodhound({
        datumTokenizer: function(d) {
            return d.tokens;
        },
        queryTokenizer: Bloodhound.tokenizers.whitespace,
        prefetch: 'URL',
        ttl:1
    });

I assume this should refresh the cache after every millisecond. However, it keeps the cache even after several refreshes. There is also no trace of a request to the URL either.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewevanscommented, Jun 3, 2017

This is what I had to do:

  1. Manually delete the local storage for that page to ensure it’s not looking at old data. If Chrome, go to Chrome Developer Tools -> Application -> Clear storage -> click “Clear selected” (I swear I have to click it a few times to make it work). This deletes all site data, so only delete Local storage if you want to keep cookies etc.
  2. Uncheck Chrome Developer Tools -> Network -> “Disable cache”.

Docs say “Initialization entails adding the data provided by local and prefetch to the internal search index” so I believe it will check local storage before any of your settings. And if your last settings put data in there with a timestamp, then it will get it.

0reactions
micahlisonbeecommented, May 15, 2018

@andrewevans this solution is fine if you’re the only user of the application.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unanswered 'bloodhound' Questions - Stack Overflow
I've been using Bloodhound with the prefetch [docs] option defined. This works fine, except when I add content to the json file being...
Read more >
FreePBX / framework / 2d520a6b30d - FreePBX GIT
... Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace('value'),queryTokenizer:Bloodhound.tokenizers.whitespace,limit:10,prefetch:{ttl:1000 ...
Read more >
US6557054B2 - Method and system for distributing updates ...
A method for distributing information to a plurality of uncoordinated user stations each of which is configured for communications with a multiplicity of ......
Read more >
Incident Response - Hybrid Analysis
... https://track.alde1.mlpnd.com/click/20661594739626/112544863/2066/6719673 (PID: 3964). iexplore.exe SCODEF:3964 CREDAT:275457 /prefetch:2 (PID: 2980) ...
Read more >
Overview - Joe Sandbox
EXE' SCODEF:6384 CREDAT:17410 /prefetch:2 MD5: ... name="__/resources/shared/scripts/courselist.json__data__ttl__" value="1617426547228" ... Bloodhound=b(a.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found