typeahead.js icon indicating copy to clipboard operation
typeahead.js copied to clipboard

How to clear cache?

Open hervehobbes opened this issue 6 years ago • 1 comments

Hello,

I'm using a local set of data (an array) to search in and I dynamically add or remove some items inside this array, how do I ask the Bloodhound to refresh its cache?

hervehobbes avatar Dec 20 '19 14:12 hervehobbes

For posterity, as I had the same issue: (this clears the cache associated with remote calls; not entirely sure about local data sets...)

let bloodhound = new Bloodhound({...});

later, to clear the cache:

bloodhound.clearRemoteCache();

viking2917 avatar Jul 07 '20 21:07 viking2917