Page 1 of 1

Caching seperately for users and guests?

Posted: Tue Nov 13, 2018 7:39 am
by seoras
I've written a custom component which I'm trying to improve performance by including Joomla's caching.
One view has additional detail which is only included for logged in users.

I've been switching the caching on using the JControllerLegacy display() $cachable and $urlparams which works very well.

Question. Is there any way to get $urlparams to take into account login status (ie JFactory::getUser()->guest)?
At the moment I'm just caching if the user is a guest and turning it off for logged in.
I'd like it to cache both view variations.

Re: Caching seperately for users and guests?

Posted: Sat Dec 08, 2018 7:02 am
by stutteringp0et
It could be done in the component itself. It's even possible to have a separate cache for guests and users, but that's something that would be done in the component code, not the cache plugins.