1

Is it possible to completely bypass PHP with the magento full page static cache?

With other application such as WordPress that use a full page static cache I write a rule in the webserver that checks the cache folder for the requested route first and if it doesn't exist then it requests the path from PHP. This gives really good performance and its just ajax calls that stress the server and they can be managed separately.

I can't see anyway to do this with magento. I have setup magento to work with varnish (provided by hosting) and the response times are OK but it can't take much concurrent usage without drastically slowing down.

I ran xdebug profiler and had a look at cachegrind file and can see that there is a lot of cpu cycles to methods labeled "non-cache".

To my mind if an app contains a full page static cache then it should be possible to serve the pre-compiled page independant of PHP via webserver.

Am I missing anything?

  • I believe this is how the litemage cache works. It does mean your host has to pay for a litespeed server license though. The problem is most shared hosting packages using it are limited to 1500 "objects". Which may or may not be enough for your site. Try also using a cdn, I found that helped quite a bit. – Chris Lingwood Jun 30 '17 at 18:35
3

Full Page Cache in Magento2 is not a separate part of the code but a regular module that hooks into request flow. It is triggered very early during the request processing so it is still improvement but due to the way it is written it requires basic magento app do be fired. This includes loading config (also from cache) and initializing store.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.