<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Sep 28, 2012, at 12:32 , Михаил Панфилов wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">А будет ли при этом ответ кэшироваться для пользователя?</blockquote><div><br></div><div><div>Да, private разрешает кэширование только клиентом.</div><div><br></div></div><blockquote type="cite">Какой при этом нужно использовать ключ кэширования на CDN?<br></blockquote><div><br></div></div><div>Стандартный. nginx будет искать ответы в кэше по ключу, но поскольку</div><div>ответы с private не будет кэшироваться, то их там и не окажется.</div><div><br></div><div><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Georgia; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Georgia; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Georgia; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><br class="Apple-interchange-newline">--<br>Igor Sysoev<br></span></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Georgia; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><a href="http://nginx.com/support.html">http://nginx.com/support.html</a></span></div><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Georgia; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><br></span></div></span></span></div><blockquote type="cite"><div class="gmail_quote">28 сентября 2012 г., 12:12 пользователь Igor Sysoev <span dir="ltr"><<a href="mailto:igor@sysoev.ru" target="_blank">igor@sysoev.ru</a>></span> написал:<br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div class="im">On Thu, Sep 27, 2012 at 08:32:34PM +0400, Михаил Панфилов wrote:<br>
> Доброго времени суток!<br>
><br>
> Не подскажете ли решение на nginx для следующей задачи:<br>
><br>
> необходимо реализовать кэширование на CDN динамических запросов. Сложность<br>
> в том, что надо как-то понимать с каким ключом (учитывать ли sid)<br>
> кешировать. Какие-то запросы уникальны для пользователей, какие-то общие.<br>
> Текущую архитектуру сайта (URL) не переделать, и хочется обойтись без<br>
> "карты сайта" (какие location уникальны для пользователя, а какие нет).<br>
> Может есть какое-нибудь универсальное решение, например, на основе<br>
> заголовков Vary?<br>
<br>
</div>Для уникальных страниц выдавать бэкендом "Cache-Control: private".<br>
<div class="im"><br>
> З.Ы. На CDN и Frontend стоит nginx.<br>
<br>
<br>
--<br>
</div>Igor Sysoev<br>
<a href="http://nginx.com/support.html" target="_blank">http://nginx.com/support.html</a></blockquote></div></blockquote></div></body></html>