@Laurence@
This statement
But that's not true at all. Nginx serves content from memory.
is not exactly hitting the truth.
First of all, there is Nginx Plus, a commercial version that behaves entirely different than the Open Source variant of Nginx, as shipped with Plesk.
Second, Nginx (read: both versions of Nginx) essentially uses memory to store all config, including metadata as specificied by proxy_cache_path directives (i.e. the keyzones).
Third, there is this thing about Nginx documentation: most of it is written for Nginx Plus, you are citing an article that is applying to Nginx Plus, not fully to Nginx Open Source.
Fourth, page content can and will only be served from memory, if and only if the Nginx config is proper: limiting the cache size can result in the desastrous result that every request will be served from disk cache (and often a Nginx conf mistake is made that will essentially Nginx caching ineffective, in the sense of "not working").
Fifth, Nginx Plus is not shipped with Plesk and across various versions of Plesk, various versions of Nginx Open Source are present (and each of these Nginx versions has a different set of capabilities with respect to caching, depending on the directives included at compilation time).
Sixth, Nginx Open Source and Nginx Plus will not often and/or not (at all) serve requests from cache, if the request uri contains variable request parameters (read: version strings or other parameters that vary across requests): if the request is not "sanitized", Nginx will just see it as a new request, hence not serving the request from cache.
And so on.....
Note that you can test the degree in which Nginx Open Source makes use of memory based caching of page content by creating one
huge testpage and caching it, by just requesting the (huge) page multiple times after Nginx has been set up properly: if everything is working properly, you should see an increase in the memory used by Nginx.
But do not bother to execute this test, since the result will often be the same in almost all cases: Nginx does not serve the request from memory.
A final remark and
tip: if you want to get the most out of Nginx and/or Nginx caching, just choose between the following alternatives
1 - use Plesk version 17.8.11, a Plesk version that ships with functionality to setup caching for Nginx Open Source (version 1.13.8, shipped with Plesk 17.8.11)
OR
2 - compile your own Nginx binary from the
mainline version repository
and alternative two is the preferred one.
Naturally, the recommend alternative is to buy the (very expensive) commercial subscription on Nginx Plus. It really is worth it, but it does not "fit" nicely into Plesk.
Regards..........