plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
489 stars 664 forks source link

Volto caching profile #1865

Open tisto opened 4 years ago

tisto commented 4 years ago

It would be great to have a basic plone.app.caching profile for Volto/REST API. First step could be to just cache all anonymous requests and ignore all logged-in user requests in the caching. With this as a base we can go further.

Not sure if that should go into plone.restapi or kitconcept.volto (and then later into Plone core).

cc @jensens @tiberiuichim @sneridagh

ToDo:

tiberiuichim commented 4 years ago

Seems like we might be able to purge all service endpoints on a Plone content item using Varnish bans: https://varnish-cache.org/docs/trunk/users-guide/purging.html#bans

Public only first sounds good! @avoinea has done some varnish work, maybe we can drum up enough interest to get something done on this.

tisto commented 4 years ago

@tiberiuichim @avoinea @datakurre @jensens @sneridagh @plone/volto-team we plan to start working on a basic caching profile for REST API tomorrow. Would you be interested in doing a call tomorrow morning to discuss this?

cekk commented 4 years ago

I'm in!

sneridagh commented 4 years ago

https://github.com/plone/plone.app.caching/pull/66

mamico commented 1 year ago

I see that the ticket is still open. I would add one more point to those listed above, if possible.

Plone has a very effective behave regarding caching (client and intermediate caching) of files, images and "stable" resources (e.g. thumbnail urls that change as the content changes).

Since at the moment the solution is to proxy SSR in Volto images and files (to avoid the error pages, not found, unauthorized, of Plone), it would be useful if the nodejs proxy for files and images to pass all the backend http headers or at least those related to http caching and p.a.caching debugging.

Thanks.