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

Cache extractFields response from Collabora #3916

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

elzody
Copy link
Contributor

@elzody elzody commented Aug 15, 2024

Summary

I rebased this PR onto #3885 because it includes a fix for an error due to using getFirstNodeById() incorrectly.
Thus, should probably wait for #3885 to be merged before merging this one

The response from extracting fields via the Collabora endpoint should be cached as long as the file has not changed, since it prevents an extra hit to Collabora. When the file changes then, it should re-hit the Collabora endpoint for the updated template fields, then cache from there.

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

@elzody elzody added 3. to review Ready to be reviewed php Pull requests that update Php code performance 🚀 feature: templates labels Aug 15, 2024
@elzody elzody added this to the Nextcloud 30 milestone Aug 15, 2024
@elzody elzody self-assigned this Aug 15, 2024
@elzody elzody force-pushed the feat/cache-template-response branch from 0d9e360 to 6036628 Compare August 15, 2024 18:31
@elzody elzody marked this pull request as ready for review August 15, 2024 18:32
Copy link
Member

@juliushaertl juliushaertl left a comment

Choose a reason for hiding this comment

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

Just one small issue with checking the cache, otherwise 👍

lib/Service/TemplateFieldService.php Outdated Show resolved Hide resolved
lib/Service/TemplateFieldService.php Outdated Show resolved Hide resolved
@elzody elzody force-pushed the feat/cache-template-response branch from 54652a0 to beee109 Compare August 19, 2024 20:39
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
@elzody elzody force-pushed the feat/cache-template-response branch from beee109 to 04024fc Compare August 19, 2024 20:50
@elzody elzody merged commit 3a67f4e into main Aug 19, 2024
59 of 61 checks passed
@elzody elzody deleted the feat/cache-template-response branch August 19, 2024 20:55
@elzody
Copy link
Contributor Author

elzody commented Aug 19, 2024

/backport to stable30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Ready to be reviewed feature: templates performance 🚀 php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache extracted template fields
2 participants