Caching seperately for users and guests?

Discussion regarding Joomla! 3.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
seoras
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Thu Aug 12, 2010 12:47 pm

Caching seperately for users and guests?

Post by seoras » Tue Nov 13, 2018 7:39 am

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.

User avatar
stutteringp0et
Joomla! Ace
Joomla! Ace
Posts: 1388
Joined: Sat Oct 28, 2006 11:16 pm
Location: Texas
Contact:

Re: Caching seperately for users and guests?

Post by stutteringp0et » Sat Dec 08, 2018 7:02 am

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.
My extensions: http://extensions.joomla.org/profile/pr ... ails/18398
Honk if this signature offends you.


Post Reply

Return to “Performance - Joomla! 3.x”