Extensions settings and Joomla's cache#742
Conversation
Overrides the save method to clear the system cache after a successful save operation.
|
|
||
| if ($result) { | ||
| // Clear the system cache | ||
| JFactory::getCache('_system', 'output')->clean(); |
There was a problem hiding this comment.
@amazeika Existing extension's configs are saving thru the extension entity hence hooking up here after save.
We could go for model behavior but the only command callback we could hook into after saving is _afterReset
There was a problem hiding this comment.
@jebbdomingo You can just rename it ComKoowaModelEntityConfig ... then extend from it. Please add a ticket on each extension repos so that we make this change as well. This should do the trick nicely.
There was a problem hiding this comment.
You can just rename it ComKoowaModelEntityConfig
@amazeika That would mean renaming the extensions model as well. While keeping it as is will not need to change the other extensions other than removing its own clearing of the system cache.
e.g. https://github.com/joomlatools/docman/blob/d11049a036fabd70512a450e46186359a14924c0/code/administrator/components/com_docman/model/entity/config.php#L193-L197
There was a problem hiding this comment.
@jebbdomingo ok, yes. I didn't see the link with the config entity. This is saving the parameters on the extensions table and all of the components use it already. It's good then.
|
@jebbdomingo one last comment. Are those calls Joomla 3, 4, 5 and 6 compatible? |
@amazeika I tested til Joomla 5. I will test in Joomla 6 |
@amazeika aplogies, I wasn't able to test in Joomla 3 as the installer of latest DOCman failed to install in Joomla 3. However, I tested in Joomla 4, 5 and 6 and all worked as expected. |
Closes #712