Run custom code and WordPress filters when using the cache module

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPrint this page

The WooCommerce Software License plugin provides a Cache Module for API interactions. This dramatically reduces the response time, preserving the server resources. That ensure other calls are also fast-forward processed. This is a unique functionality on the market, none of the other similar codes can provide such capability.
For a small business, this may not sound much. Few API calls over a time frame might not be an issue, after all.  The server can handle it with no bottleneck. Considering a growing perspective, that eventually becomes a real issue. Such a scenario is threatening your business as the host is unable to successfully process all incoming traffic. This is a vicious circle, as every new call on top of existing, with limited processing power, it conclude to an imminent break-up of the HTTP service. Worth mentioning the costs for a performance server, a dedicated machine go above $100 / month.  Using the Cache module, the plugin can easily handle thousands of API calls over a cheap hosting ( $10 /month ).

When using the Cache Module, just a small chunk of WordPress is loaded. There is no need for anything else, no themes files, either plugins assets. Just the core! That goes to an incredible response time, that gives enough room for many other API calls.

If the Cache Module is active, the WordPress filters can still run, including custom PHP code. Such filters are invoked through the add_filter function. To ensure the code is loaded by the cache module, the custom PHP block needs saved into /wp-content/mu-plugins/woosl-custom.php. That file is also loaded when turning off the Cache Module, as WordPress loads the Must-Use Plugins as default.

 

 


By woocommerce-sl, posted on February 22, 2022

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments