skip to content »

Updating cache directory

Note that it is necessary to allow the usage of a stale cached response when it is being updated.

It is thus recommended that for any given location both cache and a directory holding temporary files are put on the same file system.

A directory for temporary files is set based on the As part of commercial subscription, the shared memory zone also stores extended cache information, thus, it is required to specify a larger zone size for the same number of keys.

Starting from version 0.8.9, temporary files and the cache can be put on different file systems.

However, be aware that in this case a file is copied across two file systems instead of the cheap renaming operation.

For example, one megabyte zone can store about 4 thousand keys. A minute after the start the special “cache loader” process is activated.

updating cache directory-74

If the whole response does not fit into memory, a part of it can be saved to a temporary file on the disk.Writing to temporary files is controlled by the fastcgi_max_temp_file_size and fastcgi_temp_file_write_size directives.

updating cache directory-17updating cache directory-64updating cache directory-90

By default, the buffer size is equal to one memory page. When buffering is enabled, nginx receives a response from the Fast CGI server as soon as possible, saving it into the buffers set by the fastcgi_buffer_size and fastcgi_buffers directives.By default, the buffer size is equal to one memory page. of buffers that can be busy sending a response to the client while the response is not yet fully read.In the meantime, the rest of the buffers can be used for reading the response and, if needed, buffering part of the response to a temporary file.In doing so, you will get an error message as shown below.But from the CRM rules, a root Business Unit should have no Parent Business Unit.By default, Allows starting a background subrequest to update an expired cache item, while a stale cached response is returned to the client.