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

Added support for caching REST api calls to POST /api/ezp/v2/views #147

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

Conversation

vidarl
Copy link
Member

@vidarl vidarl commented Apr 15, 2021

Question Answer
JIRA issue N/A
Type Feature
Target version 2.0
BC breaks no
Doc needed no

This is a change to the varnish .vcl that makes it possible to cache POST requests to /api/ezp/v2/views (which is basically a search ).
The /api/ezp/v2/views endpoint do not provide xkey header in the response so purging won't work, thus the TTL is set to 600 by default.

Don't think we should merge this as-is ( /api/ezp/v2/views should defently provide xkey headers first ). But posting the code here for reference. It might be valuable to others too.

Credits to @reithor and @adriendupuis who also worked on this code

TODO:

  • Implement feature / fix a bug.
  • Implement tests + specs and passing ($ composer test)
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@vidarl vidarl changed the base branch from master to 2.0 April 15, 2021 08:01
@vidarl vidarl marked this pull request as draft June 10, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant