-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache isModuleOutputEnabled
or isModuleEnabled
status
#4323
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # app/code/core/Mage/Core/Helper/Abstract.php
c7dcbc1
to
8a58463
Compare
XML / DB config is already cached, how much time is this actually saving? |
I just tested and confirmed it's faster, although only on the order of microseconds per call. I suppose the SimpleXMLElement config cache just has that much overhead. However, it is not caching per store even though the "Disable Modules Output" can be configured at the store scope. This may cause problems in the app emulation used for sales emails. I enabled in <?php
define('MAGENTO_ROOT', getcwd());
require MAGENTO_ROOT . '/app/bootstrap.php';
require_once MAGENTO_ROOT . '/app/Mage.php';
Mage::init();
$test = Mage::helper('core');
var_dump(
$test->isModuleOutputEnabled('Cm_RedisSession')
);
Mage::app()->setCurrentStore(2);
var_dump(
$test->isModuleOutputEnabled('Cm_RedisSession')
); |
- use Mage_Core_Block_Template::isModuleOutputEnabled()
Updated:
|
This reverts commit 51c7171
-see OpenMage#4266
c53f177
to
a249bf1
Compare
Description (*)
If
isModuleOutputEnabled
orisModuleEnabled
is called multiple times for the same Module, get config once.Related Pull Requests
Mage_Adminhtml_Block_Template::isOutputEnabled()
for invalid module #4320Manual testing scenarios (*)
isModuleOutputEnabled()