Released version 1.84.0 with many new cache related features
Hello n98-magerun users!
We are proud to release the last major release of our tool to the end of the year.
Here are some statistics of a productive year:
- 30 new commands were added
- 23 githubers sent us a pull request
- 572 commits to git repository
- 18389 lines of code were added
- 24538 lines of code were removed
- 4 provisioning tools were created
- 1 deployment tool using n98-magerun was created
- Travis CI was established
- Module system was introduced. First modules are available.
- A book about n98-magerun was written
- magerun.net blog was created
This statistic shows us, that we are on the right way to establish n98-magerun as industry standard.
Kudos to all developers for the time, experience, energy, suggestions, improvements and code you spent.#
Now to the new features of the 1.84.0 release…
New cache related commands
We added two new commands in “cache” command group which are really powerful. We hope this commands will improve your daily
work with Magento and help you to investigate the internals of Magento’s caching layer.
Cache Report
Run cache:report
command to investigate what’s saved in your core cache.
The command displays a table which contains all your cache IDs.
Optionally you can add tags and mtime (modification time) with options --tags
and --mtime
to the table.
The results looks like this:
$> n98-magerun.phar cache:report
+---------------------------------------------+---------------------+
| ID | EXPIRE |
+---------------------------------------------+---------------------+
| LAYOUT_05B019F29CAFDBE5EB3CF70FAE126E29F | 2286-11-20 17:46:39 |
| LAYOUT_0D694E278B5FEB0A9FC3C26D36C3018EC | 2286-11-20 17:46:39 |
| LAYOUT_ADMINHTML_STORE0_DEFAULT_DEFAULT | 2286-11-20 17:46:39 |
| CONFIG_GLOBAL | 2286-11-20 17:46:39 |
| CORE_CACHE_OPTIONS | 2286-11-20 17:46:39 |
| CONFIG_GLOBAL_ADMIN | 2286-11-20 17:46:39 |
| CONFIG_GLOBAL_CRONTAB | 2286-11-20 17:46:39 |
| CONFIG_GLOBAL_INSTALL | 2286-11-20 17:46:39 |
| CONFIG_GLOBAL_STORES | 2286-11-20 17:46:39 |
| TRANSLATE_DE_DE_ADMINHTML_0_DEFAULT_DEFAULT | 2286-11-20 17:46:39 |
| CONFIG_GLOBAL_ADMINHTML | 2286-11-20 17:46:39 |
| CONFIG_GLOBAL_WEBSITES | 2286-11-20 17:46:39 |
| STORE_ADMIN_CONFIG_CACHE | 2013-12-14 16:45:05 |
| CONFIG_GLOBAL_STORES_ADMIN | 2286-11-20 17:46:39 |
| STORE_DEFAULT_CONFIG_CACHE | 2013-12-14 16:45:05 |
| STORE_FRENCH_CONFIG_CACHE | 2013-12-14 16:45:05 |
| STORE_GERMAN_CONFIG_CACHE | 2013-12-14 16:45:05 |
| CONFIG_GLOBAL_STORES_DEFAULT | 2286-11-20 17:46:39 |
| CONFIG_GLOBAL_STORES_FRENCH | 2286-11-20 17:46:39 |
| CONFIG_GLOBAL_STORES_GERMAN | 2286-11-20 17:46:39 |
| APP_B1FB6E8F13287C01E5C05063633DDA4C | 2013-12-14 16:45:05 |
| APP_E4D52B98688947405EDE639E947EE03D | 2013-12-14 16:45:05 |
| APP_4E4ABDD8DC00C3DACB3C1597944A3B6C | 2013-12-14 16:45:05 |
+---------------------------------------------+---------------------+
For users of the Enterprise Edition it possible to add the option --fpc
which switchs the
cache from “Core Cache” to “Fullpage Cache”.
Cache View
If you know the ID of a cache entry (use cache:report command to find one) you can see what’s stored inside your cache.
Example:
$> n98-magerun.phar cache:view APP_B1FB6E8F13287C01E5C05063633DDA4C
a:2:{i:0;a:6:{s:10:"website_id";s:1:"0";s:4:"code";s:5:"admin";
s:4:"name";s:5:"Admin";s:10:"sort_order";s:1:"0";s:16:"default_group_id";s:1:"0";s:10:"is_default";s:1:"0";}
i:1;a:6:{s:10:"website_id";s:1:"1";s:4:"code";s:4:"base";s:4:"name";s:12:"Main Website";s:10:"sort_order";s:1:"0";
s:16:"default_group_id";s:1:"1";s:10:"is_default";s:1:"1";}}
If the outout contains a serialized value you can add an additional parameter --unserialize
which prints an fancy output the stored data.
$> n98-magerun.phar cache:view --unserialize APP_B1FB6E8F13287C01E5C05063633DDA4C
Array
(
[0] => Array
(
[website_id] => 0
[code] => admin
[name] => Admin
[sort_order] => 0
[default_group_id] => 0
[is_default] => 0
)
[1] => Array
(
[website_id] => 1
[code] => base
[name] => Main Website
[sort_order] => 0
[default_group_id] => 1
[is_default] => 1
)
)
See all in action:
Enable/Disable specific cache
Many users of n98-magerun are fimilar with the handy cache:enable
and cache:disable
command.
The command is very useful for developers to enable or disable the complete caching.
In some cases it’s not really wanted to enable or disable ALL the caches. In such a case a developer
was not able to do this from command line.
For this case we added a new optional argument “code” to both commands which can specify the cache.
If you don’t know the exact cache code you can run the cache:list
command to see the status and code of all caches.
$> n98-magerun-dev cache:list
+-------------+----------+
| code | status |
+-------------+----------+
| config | enabled |
| layout | enabled |
| block_html | enabled |
| translate | enabled |
| collections | enabled |
| eav | enabled |
| config_api | enabled |
| config_api2 | disabled |
+-------------+----------+
$> n98-magerun-dev cache:disable config
Cache config disabled
$> n98-magerun-dev cache:list
+-------------+----------+
| code | status |
+-------------+----------+
| config | disabled |
| layout | enabled |
| block_html | enabled |
| translate | enabled |
| collections | enabled |
| eav | enabled |
| config_api | enabled |
| config_api2 | disabled |
+-------------+----------+
If you like to modify the status of multiple caches at once you can delimit them by comma.
Example:
$> n98-magerun-dev cache:disable config,layout,block_html
Cache config disabled
Cache layout disabled
Cache block_html disabled
See it in action:
Magento Installer
We improved the installer a little bit.
- New Magento CE 1.8.1.0 release was added (thanks to @vinai for the hint)
- var/session folder will be automatically be created
Class Rewrite List
One suggestion by Jonathan Day was implemented.
The dev:module:rewrite:list
show you now all the PHP classed from local code pool which
are releated to the vendor prefixes Mage, Enterprise, Varien and Zend.
The output looks like this:
+------------------+----------------------------+--------------------------+
| Type | Class | Rewrite |
+------------------+----------------------------+--------------------------+
| autoload: Mage | Mage_Core_Exception | Mage_Core_Exception |
| autoload: Varien | Varien_Profiler | Varien_Profiler |
| autoload: Varien | Varien_Image_Adapter_Gd2 | Varien_Image_Adapter_Gd2 |
| autoload: Varien | Varien_Autoload | Varien_Autoload |
+------------------+----------------------------+--------------------------+
#152 Added local autoloader overwrites to dev:module:rewrite:list command.
Run n98-magerun on environments that disable exec()
One of our n98-magerun power users Kalen Jordan suggested us that
the tool does not run on machines with disabled PHP functions exec
and shell_exec
.
We decided us to give such users a subset of the commands which are not releated to the shell execution functions.
The solutution was to disable the commands like db:dump (uses mysqldump command line tool).
#261 Compatibility with environments that disable exec()
Minor fixes and improvements
- #264 Grammar correction and send warning to stderr (by Melvyn Sopacua)
- #265 Features/install cmd fail invalid db config (by AydinHassan)
- #268 Added @search database table group to readme (by Tegan Snyder)
Updated 3rd party libs
We updated all Symfony compontents to new 2.4 release which is fully compatible with latest 2.3 release.
See release notes for further informations: http://symfony.com/blog/symfony-2-4-0-released
Conclusion
We hope you will safe many time by using our tool. If yes, spend the free time to your families and friends.
Your netz98 Team
1 Comment
Magento-Neuigkeiten der Wochen 49/50 2013 · December 15, 2013 at 12:26
[…] Münch hat n98-magerun 1.84.0 veröffentlicht und zeigt sein […]