D
D
Dwarf Scavenger2016-10-22 22:04:22
Nginx
Dwarf Scavenger, 2016-10-22 22:04:22

Caching Dynamics Zend OpCache and fastcgi_cache?

There is a vps with a LEMP bundle, it has a dozen sites spinning on various kms (wp, dle, modx). We need to do normal caching, because the load is gradually growing. Now the cache works through all sorts of plugins, etc., everything is done out of the box by default, the site is installed and forgotten. Interested in the question, how best to organize the caching of dynamic content? Is one php Opcache accelerator enough, or should I burn it and cache it with NGINX using fastcgi_cache, or is it better to use them together ....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-10-22
@JusTsar

1. opcache is mandatory, it caches PHP bytecode, it's silly to turn it off.
2. fastcgi_cache - caches the result. Ideal for static and if you are too lazy to raise some kind of varnish. However, it should be understood that you will have to suffer a lot with cache invalidation. Popular CMS already have good plugins (the same wp total cache) that take care of everything. And in general, they are even capable of dumping themselves onto the file system so that nginx would stupidly give up static and not even touch fastcgi. Therefore, you should think again whether you need it. And if necessary, look for ready-made plugins that handle cache invalidation normally.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question