joomla/joomla-platform — pull request #933 by nonumber (2012-02-27 09:12:29+00:00)
Title: Removed caching from module list

[this is a re-request from the faulty: https://github.com/joomla/joomla-platform/pull/867]

Since modules can be published based on time (publish_up / publish_down), the caching on the initial published module list makes no sense.

The caching key ($cacheid) only takes into consideration the $Itemid, $groups, $clientId, $lang.
However, the cached module list is time based.

This means that the publish up/down settings have no effect as long as the list is still cached.
So that is a bug.

When looking at what is actually cached, there is not much to be gained by the caching as it is. It is only a database query and some basic checks on the returned object list.

So taking above into account (that caching causes the timed based bug and that there is little to no gain in caching), the solution is to simply take out the caching altogether.

=====
Regarding performance:
As far as I can tell only the module list that is returned from the database is stored in that cache.
Not the rendered modules themselves.

Advanced Module Manager and MetaMod Pro have been overruling this module helper file as it is with one that (among other things) doesn't use this cache.
We have seen no noticeable effects on page load time due to this non-use of module list cache.
Thousands of people are using these extensions and we have had no reports of pageload time problems related to this.

In what I have been able to test locally, there is no noticeable difference in load time (debug info) and a small decrease in memory usage when commenting out the $cache->store line.