plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
249 stars 188 forks source link

Restapi caching granularity #4017

Open cekk opened 3 weeks ago

cekk commented 3 weeks ago

Now all restapi routes are configured with terseCaching. restapi routes can have different needs so we could be able to assign different rulesets to them.

For example content GET can be cached for more time than high dynamic endpoints like @search or @querystring-search

Proposal:

davisagli commented 3 weeks ago

For example content GET can be cached for more time than high dynamic endpoints like @search or @querystring-search

It depends... if there are API expanders enabled, then the content GET might also include data from other content items (e.g. navigation & breadcrumbs components)

cekk commented 3 weeks ago

For example content GET can be cached for more time than high dynamic endpoints like @search or @querystring-search

It depends... if there are API expanders enabled, then the content GET might also include data from other content items (e.g. navigation & breadcrumbs components)

yes, you're right, but having a separate caching ruleset allows us to potentially tweak settings only for contents. If you don't need or don't want (because as you said there are some dynamic infos in expanders), you could stay with terse.

folix-01 commented 2 weeks ago

We decided that there is no necessity to have the separated profiles. But we just give the possibility to manage granularly the caching rulesets for RestAPI Services giving the priority in caching rulesets negotiation if the service name is used in the caching operation ruleset.

Prs: https://github.com/plone/plone.app.caching/pull/143 , https://github.com/plone/plone.rest/pull/183