Magento 2 Cache Booster

Magento 2 Cache Booster by aMiSTACX

March, 2019 – As part of our in-house A51 projects for Magento and WordPress, we are now beta testing a new Cache Booster designed for Magento 2.3.0+, and specifically to work with our S3 Titanium High Availability Modules.

What we can say is it works very differently than cache warmers that frequent the current Magento 1 & 2 module markets, and thus we call it a cache booster rather than a cache warmer.

ramjet uses this high pressure in front of the engine to force air through the tube, where it is heated by combusting some of it with fuel. It is then passed through a nozzle to accelerate it to supersonic speeds. This acceleration gives the ramjet forward thrust. ~Wikipedia

So just like the namesake, we force more cache into Magento to help it accelerate to super speeds! Although not meant for sites that have inherent problems to begin with. Ramjet functions directly to what is cacheable to the public. Meaning, if your Magento’s caching engine is broken, Ramjet will not save you.

Ramjet has also been tested and designed to work with very large catalogs! Beta tests have been performed on 1 million + catalog items with about 7K categories, and we have seen load times as low as 1.7 seconds! That is truly amazing 😀

The new Cache Booster will be available later in March 2019 for ALL S3 Titanium stacks for Magento, and select Developer stacks.

Beta Testing Commands

For basic starting you need to run:
“`
sudo php bin/magento ramjet:start –content-type=[CONTENT_TYPE]

sudo php bin/magento ramjet:start --content-type=all --threads=5
“`

Where CONTENT_TYPE can be

product (Product details page)
category (Categories page)
cms (CMS pages)
all (All of the above)

Note: For better performance the Ramjet module has a content filter.

CLI interface supports the next command-line arguments:
–start-page (-c)
–limit (-l)
–timeout (-t)

Examples:
Start cache warming from the N – page, for example from 20
“`
sudo php bin/magento ramjet:start –content-type=[CONTENT_TYPE] –start-page=20

“`
Note: Every page contains 20 records.

Set limit for pages. For example to 200
“`
sudo php bin/magento ramjet:start –content-type=[CONTENT_TYPE] –limit=200

“`
Run cache warming with timeout set to 20 seconds.
“`
sudo php bin/magento ramjet:start –content-type=[CONTENT_TYPE] –timeout=20
“`

After 20 seconds the script will stop and last page index will be stored.
So in the future, the module will offer to start from the last index.
You can start from the last index or from the beginning

“`
sudo php bin/magento ramjet:start –start-index=0
“`

You can combine the commands :
“`
sudo php bin/magento ramjet:start –content-type=[CONTENT_TYPE] –start-page=10 –limit=2000

sudo php bin/magento ramjet:start –content-type=[CONTENT_TYPE] –start-page=100 –timeout=3600
“`

Advanced Cache Learning

Use this switch to pre-load only the most popular products or categories:

sudo php bin/magento ramjet:start --content-type=[CONTENT_TYPE] --most-viewed --min-count-views=#

Where # = number of views equal or greater. This is useful with large catalogs were pre-loading takes several hours or days, and hence we can just preload the most popular items to save time.

Where [Content Type] = Product or Category

Performance Tuning

Our stacks preserve Magento’s .user.ini files in both /var/www/magento/ and /magento/pub/

This means they override php.ini and .htaccess on Apache/NGINX. For Ramjet, we recommend at least a t3-Medium and about 3-5GB of Magento memory allocation. This is because almost everything is held in cache.

You have several layers of caching: CDN, PHP, Magento-Redis

Closing Remarks

Keep in mind Ramjet cache booster is in beta, and we will add to the GUI, and maybe add performance improvements and fix bugs. We will also start versioning in the GUI. So keep this page bookmarked 😉

~ Lead_Robot

Comments are closed.