Skip to content
This repository was archived by the owner on Sep 3, 2026. It is now read-only.

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

Draft
vidarl wants to merge 1 commit into
2.0from
cache_REST_post_views
Draft

Added support for caching REST api calls to POST /api/ezp/v2/views#147
vidarl wants to merge 1 commit into
2.0from
cache_REST_post_views

Conversation

@vidarl

@vidarl vidarl commented Apr 15, 2021

Copy link
Copy Markdown
Member
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant