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

Add ability to clear cache to allow real-time refresh of search results. #808

Merged
merged 4 commits into from
Jul 25, 2022

Conversation

fadeaway
Copy link
Contributor

@fadeaway fadeaway commented Jul 25, 2022

Pull Request

What does this PR do?

Fixes #790

Implements clearCache method on InstantMeiliSearchInstance to allow realtime updates to search results. This allows algolias refresh example to work out of the box. (https://www.algolia.com/doc/guides/building-search-ui/going-further/improve-performance/vue/#caching)

PR checklist

Please check if your PR fulfills the following requirements:

  • [X ] Does this PR fix an existing issue?
  • [X ] Have you read the contributing guidelines?
  • [X ] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

Copy link
Contributor

@bidoubiwa bidoubiwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A part from the order of the imports it looks very good to me :)

src/client/instant-meilisearch-client.ts Outdated Show resolved Hide resolved
src/types/types.ts Outdated Show resolved Hide resolved
@bidoubiwa bidoubiwa added the enhancement New feature or request label Jul 25, 2022
Copy link
Contributor

@bidoubiwa bidoubiwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥 thanks a lot :)

@bidoubiwa
Copy link
Contributor

bors merge

@meili-bors
Copy link
Contributor

meili-bors bot commented Jul 25, 2022

@meili-bors meili-bors bot merged commit c01f9fd into meilisearch:main Jul 25, 2022
@dasraab
Copy link

dasraab commented Nov 29, 2022

i think this feature is missing in the official documentation. would be great to add that.

@bidoubiwa
Copy link
Contributor

#893 :) thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalidate client cache
4 participants