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

XWIKI-22936: XWiki.SearchSuggestCode is not cached #3944

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

manuelleduc
Copy link
Contributor

Jira URL

https://jira.xwiki.org/browse/XWIKI-22936

Changes

Description

  • provide server side cache headers and invalidation logic
  • for now the logic is local to XWiki.SearchSuggestCode but it should be possible to generalize to make it easier to reuse in other cases

Clarifications

Screenshots & Video

Executed Tests

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    *

@manuelleduc
Copy link
Contributor Author

manuelleduc commented Feb 27, 2025

@michitux @tmortagne @mflorea do you see obvious limitations with what's proposed in this PR?
I feel like this is an interesting approach as it does not require modifying the client-side code.
Of course completely removing the re-validation request is nicer, but this option already allows removing need to transfer the response body through the network in many cases.

@michitux
Copy link
Contributor

michitux commented Mar 3, 2025

What we usually do I think is to put the version of the document in the URL - if we could add the version of the configuration in the URL, this whole code wouldn't be necessary and we could simply enable long caching. I wouldn't be sure that this improves anything as at the point where this code is executed, it shouldn't make a big difference if the small content or the header is returned.

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

Successfully merging this pull request may close these issues.

2 participants