I'm using the algolia client directly in my node js backend so i don't use instantsearch.js
.
I can easily querying/indexing/updating etc. my algolia index but i can't find a way to clear the cache because my app always need to display an updated hits list in real time.
i've tried
client.initIndex('my index');
client.clearCache()
But without success. Always need to force unmount/remount manually my app to see the updated hits list.
Any solution ?
Its an old question but since there are no responses ....
Docs
Given the following instantiation:
There are two methods.
client.clearCache()
- when using multiple indicesindex.clearCache()
- when querying one index specificallyNote that BOTH return a
Promise
and both work only in the BROWSER, since the Node API doesn't cache results, there is no cache to clear.