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" :) ?
Labels |
Added:
?
|
Category | ⇒ | com_cache |
Labels |
Added:
J3 Issue
|
Status | New | ⇒ | Information Required |
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
yes. but i think nobody wants implement this feature in future versions of CMS.
so can you please close this Issue?
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-04-25 19:18:57 |
Closed_By | ⇒ | boomsya |
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
Status | Closed | ⇒ | New |
Closed_Date | 2018-04-25 19:18:57 | ⇒ | |
Closed_By | boomsya | ⇒ |
fast joomla nobody needed?
Status | New | ⇒ | Information Required |
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.
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-03-05 09:58:50 |
Closed_By | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/20011
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.