algolia / instantsearch

⚡️ Libraries for building performant and instant search and recommend experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/
MIT License
3.73k stars 526 forks source link

feat(sessionStorage): allow a cache key suffix #6370

Closed Haroenv closed 2 months ago

Haroenv commented 2 months ago

Summary

Adds a key option to sessionStorage cache.

This allows the use case of multiple infinite hits displayed on one page (like multi index with tabs).

Result

You can use the key if you're using multiple session storage caches / multiple InstantSearch instances to have your results not overridden.

codesandbox-ci[bot] commented 2 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6c8b124dbb4c04519b441cd7f2873eeda2c84af7:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration