#1 2023-03-15 21:19:04

Registered: 2012-09-10
Posts: 200


I think it would be useful to add cacheParamsWithSession that would combine caching with session data and parameters.

For example page could render different based on logged user (covered now with cacheRootWithSession) and based on logged user and parametars which is not covered right now.


#2 2023-03-17 08:34:11

From: France
Registered: 2010-06-21
Posts: 13,650

Re: TMvcRendererCachePolicy

Caching benefits if several clients/users are likely to retrieve the same exact content at the same time.
Whereas a session-customized page is for a single client/user only.
So it was not implemented because it was not worth it.
Caching such pages would sound like premature optimization to me.

If was not implemented because cache was meant for static pages, not for session-customized pages.
And it would be much more complex to handle several versions of the same page depending on the session.

I doubt there would be a great performance benefit, since a single user would use the page.
The client already should receive a 304 NOT CHANGED code so avoid any transmission - which is likely to be more the bottleneck.


Board footer

Powered by FluxBB