ビリャチピスデツナフイ Войти !bnw Сегодня Клубы
Nginx как-то можно заставить кешировать, но каждый раз переспрашивать бекенд с if-modified-since и без указания proxy_cache_valid?
#J72QRH / @komar / 4023 дня назад

А что бекенд должен отвечать? // по-моему ты хочешь etag
#J72QRH/L0M / @anonymous / 4023 дня назад
@anonymous Бекенд должен отвечать Not Modified / 200 OK
#J72QRH/QI6 / @komar --> #J72QRH/L0M / 4023 дня назад
@komar А Cache-Control оно поддерживает?
#J72QRH/3CL / @anonymous --> #J72QRH/QI6 / 4023 дня назад
@anonymous Кто «оно»?
#J72QRH/UZT / @komar --> #J72QRH/3CL / 4023 дня назад
@komar бекенд
#J72QRH/RI9 / @anonymous --> #J72QRH/UZT / 4023 дня назад
@anonymous Кстати, нет. Пойду впилю.
#J72QRH/HYI / @komar --> #J72QRH/RI9 / 4023 дня назад
@komar ну и пердолься в rfc, что там нужно выставить, чтобы работало как надо
#J72QRH/5LI / @anonymous --> #J72QRH/HYI / 4023 дня назад
@anonymous чет лениво
#J72QRH/08J / @komar --> #J72QRH/5LI / 4023 дня назад
@komar сорь
#J72QRH/B1X / @anonymous --> #J72QRH/08J / 4023 дня назад
@komar Пиздец, все равно не работает.
#J72QRH/CI3 / @komar --> #J72QRH/HYI / 4023 дня назад
@komar Бля, я выставил max-age=0 Теперь работает. Пойду проверю, как оно инвалидирует.
#J72QRH/4PS / @komar --> #J72QRH/CI3 / 4023 дня назад
@komar Как и ожидалось, инвалидация нихуя не запрашивается. Клево.
#J72QRH/FM5 / @komar --> #J72QRH/4PS / 4023 дня назад
@komar При max-age=0 nginx раньше ответы вообще не кешировал, так что лучше его вообще не использовать (щаз хз что, надо проверять). куски релевантных rfc: >If an origin server wishes to force a cache to validate every request, it can assign an explicit expiration time in the past to indicate that the response is already stale. Compliant caches will normally validate a stale cached response before reusing it for subsequent requests (see Section 4.2.4). >If a response includes both an Expires header and a max-age directive, the max-age directive overrides the Expires header, even if the Expires header is more restrictive. This rule allows an origin server to provide, for a given response, a longer expiration time to an HTTP/1.1 (or later) cache than to an HTTP/1.0 cache. This might be useful if certain HTTP/1.0 caches improperly calculate ages or expiration times, perhaps due to desynchronized clocks. так что впердоливай что-то в духе: >proxy_http_version 1.1; # В HTTP/1.0 хуй знает что с кешированием >proxy_ignore_headers Expires Cache-Control; >add_header Cache-Control "public, must-revalidate, proxy-revalidate"; >expires “Thu, 31 Dec 2016 23:59:59 GMT”; # Дата в прошлом >proxy_cache_revalidate on;
#J72QRH/6MM / @anonymous --> #J72QRH/FM5 / 4022 дня назад
ipv6 ready BnW для ведрофона BnW на Реформале Викивач Котятки

Цоперайт © 2010-2016 @stiletto.