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

How to clear cache? #1775

Open
hervehobbes opened this issue Dec 20, 2019 · 1 comment
Open

How to clear cache? #1775

hervehobbes opened this issue Dec 20, 2019 · 1 comment

Comments

@hervehobbes
Copy link

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?

@viking2917
Copy link

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();

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

No branches or pull requests

2 participants