-
Notifications
You must be signed in to change notification settings - Fork 73
Could not find the option to clear cache or "render" the client again #973
Comments
Could it be that you're searching for Refresh? angular-instantsearch/examples/storybook/src/custom-widgets.ts Lines 106 to 136 in 1a12f5e
Also the cache can be disabled completely by passing: // v3 algoliasearch
const searchClient = algoliasearch('id', 'key', { cache: false });
// v4 algoliasearch
import { createNullCache } from '@algolia/cache-common';
const searchClient = algoliasearch('id', 'key', {
{
// Caches responses from Algolia
responsesCache: createNullCache()
// Caches Promises with the same request payload
requestsCache: createNullCache()
},
}); |
@Haroenv about cache this is good. thanks the issue is that if i replace the apiKey because i got a new client the instasne seatch still has the same client i print the apiKey and it is the same always until i will refresh or re render the page i figured it out only by render all component again so it will generate the html (with ng-if) from scratch but this is a bad solution for me because i got "refresh" and lost my search params so i have the function fetchKey() that update the "this.config" with the searchClient , but its does not help
so to focus the question: i got action from user to update list |
Hello
1 . i have to get a new api key by user action
once I update the config object , the ais-instasearch keep working with the previous api key
so i m trying to find a way to clear cache or update the config object , in order to "render again" the instance search without rendering all the component
html :
2- is it possible to always query algolia without using cache request while search or using facets ? (without refresh button or smth like that)
tried
searchClient.clearCache()
(does not work)The text was updated successfully, but these errors were encountered: