User tests: Successful: Unsuccessful:
Pull Request for pr #40316.
It adds a new loadFromCache
function in the AbstractModuleDispatcher
as replacement for the static ModuleHelper::moduleCache
function
It shows some articles in the module.
It shows some articles in the module.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org: joomla/Manual#103
No documentation changes for manual.joomla.org needed
Category | ⇒ | Libraries Modules Front End |
Status | New | ⇒ | Pending |
Title |
|
Title |
|
Labels |
Added:
PR-4.4-dev
|
Why not, what is different to what we have now in the abstract class?
There is no different behavior in the code. However, from what I see, the loadFromCache
method from abstract can only be used in the same way with cache callback controller, that is to cache the return values of a method. This works for modules implement it own cache like mod_articles_categories, mod_articles_category, mod_related_items.....
There are other modules which we need to cache it's whole output. That's the logic implemented in ModuleRenderer
which I mentioned above. How would you handle that using the new code? Maybe I do not see something ?
Maybe a simple question: How you handle cache for mod_articles_latest
use the this replacement?
The cache in ModuleRenderer caches the whole output of the module while this one here calls the module and caches only the data. So on some point this caching should be replaced with the one in ModuleRenderer. Means they are completely different.
Done
I have tested this item
I have tested this item
I am sorry to say,
We cannot deprecate ModuleHelper::moduleCache
because it actively used for module caching, when global cache is enabled.
Additionally loadFromCache
introduce a large code duplication.
It does not looks right to me.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-06-26 11:25:35 |
Closed_By | ⇒ | laoneo | |
Labels |
Added:
Feature
?
Removal
|
I don't know how this replacement could be used to cache the output of the whole module in
ModuleRenderer
here https://github.com/joomla/joomla-cms/blob/4.3-dev/libraries/src/Document/Renderer/Html/ModuleRenderer.php#L83 ?