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

Enable caching for search results view #1

Open
Ambient-Impact opened this issue Jul 15, 2022 · 0 comments
Open

Enable caching for search results view #1

Ambient-Impact opened this issue Jul 15, 2022 · 0 comments
Labels
bug Something isn't working performance Performance optimizations, caching, and so on.

Comments

@Ambient-Impact
Copy link
Member

Ambient-Impact commented Jul 15, 2022

The view currently has caching set to none to work around the problem that the Search API excerpt gets cached for a given highlight the first time it's viewed when set to tag-based caching. This issue was surfaced when running the database update introduced in Wrong query type & cache type on Search API Views [#3196990] via search_api-8.x-1.24.

Investigation should be done into how to vary the excerpt by the terms used, presumably via cache contexts. Re-rendering the view for every search performed will not scale well and puts unnecessary load on the server.


December 2022 update: this is beginning to be a bigger issue as search results can take quite a while generate and sometimes cause submitting the search form to hit the PHP time limit. There are two main issues here:

  1. The Search API module doesn't seem to vary search results caching by search terms. There's an open issue to address this.
  2. There's potentially a lot more rendering happening than is expected based on content that should already be rendered and indexed.

Both of these need to be implemented/fixed to allow caching to work correctly.

@Ambient-Impact Ambient-Impact added enhancement New feature or request performance Performance optimizations, caching, and so on. labels Jul 15, 2022
@Ambient-Impact Ambient-Impact added bug Something isn't working and removed enhancement New feature or request labels Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working performance Performance optimizations, caching, and so on.
Projects
None yet
Development

No branches or pull requests

1 participant