дубли в кэше

Anton Kuznetsov maybe на arjlover.net
Пн Ноя 9 16:56:47 UTC 2015


Добрый день!

Обнаружил странность.
В конфиге:
fastcgi_cache_key "$request_method|$cache_gzip|$host|$request_uri";

Все стандартно, $cache_gzip=0|1 - переменная выставляется от енкодинга
браузера.

Грепаю директорию кэша по урлу и вижу 6 файлов, хотя ожидал увидеть 2! Как
так случилось что появилось 5 файлов с абсолютно одинаковым KEY? Причем они
живут своей жизнью. Я вижу что этот урл бегает на бэкенд 4-5 раз в час,
хотя должен час жить и умирать только раз в час.

KEY: GET|gzip|example.com|/api/v1/2213992
X-Powered-By: PHP/5.4.5
Expires: Tue, 27 Oct 2015 14:04:38 GMT
Pragma: cache
Cache-Control: max-age=3600, must-revalidate

KEY: GET|gzip|example.com|/api/v1/2213992
X-Powered-By: PHP/5.4.5
Expires: Tue, 27 Oct 2015 14:00:51 GMT
Pragma: cache
Cache-Control: max-age=3600, must-revalidate

KEY: GET||example.com|/api/v1/2213992
X-Powered-By: PHP/5.4.5
Expires: Tue, 27 Oct 2015 13:20:50 GMT
Pragma: cache
Cache-Control: max-age=3600, must-revalidate

KEY: GET|gzip|example.com|/api/v1/2213992
X-Powered-By: PHP/5.4.5
Expires: Tue, 27 Oct 2015 13:49:07 GMT
Pragma: cache
Cache-Control: max-age=3600, must-revalidate

KEY: GET|gzip|example.com|/api/v1/2213992
X-Powered-By: PHP/5.4.5
Expires: Tue, 27 Oct 2015 14:07:01 GMT
Pragma: cache
Cache-Control: max-age=3600, must-revalidate

KEY: GET|gzip|example.com|/api/v1/2213992
X-Powered-By: PHP/5.4.5
Expires: Tue, 27 Oct 2015 13:37:40 GMT
Pragma: cache
Cache-Control: max-age=3600, must-revalidate

-- 
Best regards,
Anton Kuznetsov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-ru/attachments/20151109/febe239b/attachment.html>


Подробная информация о списке рассылки nginx-ru