J3 Issue ?
avatar boomsya
boomsya
28 Mar 2018

J1.5-J3.8.6

i have many sites where modules updating once per day, hour. I am always try to use cache on sites because site without cache heavy load CPU on webhoster. And i have some sites with 13.000 users per day and 120.000 page views

when user is Guest (not logined) - all ok
but when user logined - cache not using. It is give some trouble with CPU load.

so, as partially solutions - enable force using modules cache. I have 50-70% of modules (like currencies, weather, top users, banners, community groups, ... etc) which not needed display actually information under logined user.

can Joomla developers add addtional option to "using cache" in module setting like "Force using"/"Using anyway and any time" :) ?

avatar boomsya boomsya - open - 28 Mar 2018
avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Mar 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Mar 2018
Category com_cache
avatar brianteeman brianteeman - change - 3 Apr 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 3 Apr 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Apr 2018

can someone please give a Comment on this Issue as it is since near one Month asked?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20011.

avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Apr 2018
Status New Information Required
avatar mbabker
mbabker - comment - 21 Apr 2018

As a general rule of thumb a response based on a privileged user's state should be considered a private a non-cacheable resource, an option like this would either call for extra overhead in the code deciding what to cache to do more caching based on ACL and view access levels or introduce a scenario where information is leaked based on which user caused the data to be cached

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Apr 2018

@boomsya are you interested on further Discussion on this Topic?

avatar boomsya
boomsya - comment - 25 Apr 2018

yes. but i think nobody wants implement this feature in future versions of CMS.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Apr 2018

so can you please close this Issue?

avatar boomsya boomsya - change - 25 Apr 2018
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2018-04-25 19:18:57
Closed_By boomsya
avatar boomsya boomsya - close - 25 Apr 2018
avatar boomsya
boomsya - comment - 23 Jan 2019

sorry for not good english :)
today i was testing my modification of core module rendering.
Problem what i have on some sites is 20 modules with ads and some other modules.
Under guest - no problem because cache enabled and SQL queries count is minimal and CPU not loading.

but under user this modules gives CPU load + DB SQL queries. It is problem. Big problem.
my sql opitization in this modules gives some acceleration but anyway - DB is heavy loaded.

so i modified file libraries/src/Document/Renderer/Html/ModuleRenderer.php
if (($params->get('cache', 0) == 1 || $params->get('cache', 0) == 2) && \JFactory::getConfig()->get('caching') >= 1 && $cachemode != 'id' && $cachemode != 'safeuri')

i was added || $params->get('cache', 0) == 2

and second file is libraries/src/Helper/ModuleHelper.php
if ($moduleparams->get('owncache') === 0 || $moduleparams->get('owncache') === '0' || $conf->get('caching') == 0 || $moduleparams->get('cache', 0) == 2/*|| $user->get('id')*/)
in this file commented checks userid and add check module cache param = 2

and CMS core now using modules cache under logined user. All works fine!
but!!!! i have some modules which should not using cache under user. This module like polls or modules which draw different module body under logined user and not logined. So i was add third param in module XML like:

<field name="cache" type="list" default="1" label="Caching" description="Select whether to cache the content of this module">
<option value="2">No caching under logined user</option>
<option value="1">Use global</option>
<option value="0">No caching</option>
</field>

and that module works in three modes:
0 - not using cache
1 - cache under guest + cache under user
2 - cache under guest + no using cache under user

Web site rendering with my modification very fast
mans. What you think about adding this feature in new joomla versions? i using 3.9.2

avatar boomsya boomsya - change - 23 Jan 2019
Status Closed New
Closed_Date 2018-04-25 19:18:57
Closed_By boomsya
avatar boomsya boomsya - reopen - 23 Jan 2019
avatar boomsya
boomsya - comment - 26 Jan 2019

fast joomla nobody needed?

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Mar 2019
Status New Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Mar 2019

@Hackwar is this a Topic for j4 too?

avatar Hackwar
Hackwar - comment - 5 Mar 2019

I understand the frustration, but I agree with @mbabker here. I don't see this as part of the default Joomla core. The potential for security issues and using it wrong is to great for my taste. If you really need this, then you should look into ways to have this with proper core overrides. However I also suggest to look into optimisations of your site first. Generally, your site should respond quickly when you are the sole user and cacheing can then be used to scale that to lots of users, but it is not a solution for a generally slow site.

avatar joomla-cms-bot joomla-cms-bot - change - 5 Mar 2019
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 5 Mar 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Mar 2019
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2019-03-05 09:58:50
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 5 Mar 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Mar 2019

closed as stated above, thanks for taking time @Hackwar

Add a Comment

Login with GitHub to post a comment