K
K
Kostushko2015-02-18 08:24:56
Nginx
Kostushko, 2015-02-18 08:24:56

Is it possible to deferred page refresh in nginx cache?

Can you tell me if delayed caching of the page is possible in nginx.
Thus, if the page is in the cache, nginx will give the cached copy anyway, regardless of the fastcgi_cache_valid parameter. And then I analyzed the age of this page in the cache, and if it is more than that specified in fastcgi_cache_valid, then the page in the cache would be updated using nginx (either through an additional location or through a call to a php script).
The task is to determine the "age" of the page in the cache at the nginx level and generate a request to update the page in the cache if it exceeds a certain level, similar to that specified in fastcgi_cache_valid.
fastcgi_cache_valid is less than the cache lifetime given in fastcgi_cache_path ... inactive ....
The structure is: user->nginx->php-fpm->site engine.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Samilko, 2015-05-16
@kuroneco

At first glance, such a bicycle looms:
Leave the lifetime of the cache for an infinite amount of time.
And when accessing some location, a script is executed that goes through the cache folder and deletes files that exceed the required time (the creation time is the current time).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question