Everyone who is familiar with Magento knows that it’s a popular e-commerce engine which is very demanding to hardware. But it’s good that developers of this online store management system managed to qualitatively solve this problem and created a range of possible boosters which help to qualitatively test a product but are quite unwelcome in a process of a project release.
Some Words About Magento Online Store Management System
The CMS strength lies in a wide base of built-in functionality. In other words, everything you get after installing the Internet store.
After installing Magento on your PC, you will get:
- A big number of connected currencies;
- A huge base of sites on one platform;
- Reports;
- A possibility to install a limited access.
On a technical side, Magento is a complex system on the basis of Zend Framework. To efficiently work with a dynamic content of online store management system and future testing, you should use a connected Prototype framework.
Usually, Magento has a long process of giving a user a loaded page. To speed up this process, developers and QAs use numerous possible boosters – cache, combine CSS with JS, data compilation, indexes, 1 compressed file, etc.
As long as we are interested in the cache itself, let’s overview a range of possibilities to clear, configure and test it in the process of issuing a release.
What Types of the Cache Has Magento?
This online store management system has the following types of a system “trash”:
- Configurations – you should clear cache right after making changes to configuration files;
- Templates – clear cache after making changes to template files;
- Collection information – usually, such type of cache is cleared automatically but sometimes client’s module can automatically add notes which can’t be cleared by a CMS. Before a release, such type of cache must be thoroughly checked for its functionality of self-updating and interoperability with potentially installed modules;
- Information on reflections – a cache of information from API interface;
- DDL of databases an – automated clearing the Magento;
- EAV attributes: API cache of the configuration of the created Internet store;
- Page cache: clearing is made after making changes to the pages;
- Translation: you need to clear the cache in the process of modules translation;
- Installation of web services parameters: caching of web API structure of your site.
That’s how a list of cache looks like in a CMS:
As we can see from the list, the functional cache has numerous types, so before its testing, you should thoroughly and with a clear understanding test every type of data.
Deleting with the Help of an Admin Panel
As we know, Magento developers created a really useful function of clearing the cache, which helps to quickly and properly test chosen pages and improve vulnerabilities of a build.
A cache helps a page to significantly speed up a load of any page and display a content the of Magento platform.
But if in the process of work, a site or its separate part (category, filter, attributes or fixed block) was changed, updating the cache is obligatory. Since it’s logical that a correct and proper displaying of any detail of the Internet store is important for a user.
Hence, one of the simplest ways to test a cache clearing can be performed with the help of Magento admin panel. For this, you need:
- Go to the “Menu” section –“System” – “Cache managing”;
- Put a checkmark on all types of cache;
- In the “Actions” block choose a “Renew” parameter;
- Click on “Send”.
But it’s not always so easy.
There are situations when a created store uses integrations with third-party CMS and services.
For example, connected online store management systems help to add or edit catalog products. Or trivially configured remote work of SOAP API Magento.
It’s not comfortable to permanently click in admin panel and a manual clearing of cache is not a good choice.
You can create simple and clear PHP script for updating/clearing cache in Magento.
A created script should be installed in the shell/cacheRefresh.php file and connected to a task of configured cron (for example, once in 1 hour).
Now you can test a cache in Magento with the help of a crone or automatically and the time of it can be chosen by a QA or a developer.
Checking a Status of Cache Enabling/Disabling
To quickly check a status of Magento cache on a tested project, you should type such query:
Example:
Enabling/Disabling Cache Types
This command helps to operate types of cache which were chosen by a QA for a test.
Temporary enabling of cache types will be also useful if a tester wants to change a work of a product while enabling/disabling a cache. But remember that permanent disabling of cache types can hugely decrease a total performance of a system.
To quickly view at a state of the cache and its status, you should just type such command:
and you’ll get such a result:
Cleared Cache and Hidden Cache Types
To quickly test outdated cache types for total performance, you should clear or delete them.
A clearing will completely delete all outdated elements of enabled types in Magento admin panel. In other words, such function does not influence other parameters or online store management systems (third-party modules), as it clears only such cache that is used by a Magento CMS itself.
[highlight dark=”no”]Remember: disabled cache types can’t be cleared![/highlight]
Recommendation: clear necessary types of cache if you have problems with a data “isolation”.
Apply such command:
Additional Possibilities of Work with Cache
- The base of cache media files – test this cache if a product uses different images from a catalog, which were previously cached but are not used now;
- CSS/JS cache – such type of cache combines styles and JS of your Internet store. In the process of testing a particular template, clear such type of cache in case if you have not found a necessary mockup;
- A cache of static files and folders – it can be easily cleared.
To conclude, we should point out that Magento online store management system is a good tool for a big and efficient release (for example, Internet store) where even insignificant parameter needs a thorough testing and configuration with other elements of a system.
A cache is an obligatory component which any QA should thoroughly test and run in all possible situations.
As we can see from the information, mentioned above, there are numerous variations of work with a cache in Magento, and it means that you should prepare a test case before starting to work with this e-commerce engine. For example, a process of cache running can be divided, depending on type and kind of data – a page cache, media files cache or modules translation cache.
0 Comments