Welcome! Log In Create A New Profile

Advanced

Re: Skipping the proxy cache based on a cookie?

December 30, 2010 08:27AM
I've dug a bit deeper into the documentation and it seems like proxy_no_cache and proxy_cache_bypass should somehow do the trick, but I can get things to work with my exact scenario.
Here's the flow I'd like to create:
1. when a new user reaches the site, it is forwarded to the backend and receives a few cookies back.
A "new user" is identified by a [b]lack[/b] of a certain cookie, which is something I couldn't figure out how to implement (seems like it only supports bypassing/no caching if a cookie exists, but not if it doesn't).

This request should not be taken from the cache, but the response can be stored in cache as long as further requests will not be sent the cookies this request produced.

2. Returning visitors can be served from the cache, unless they are logged in (in which case they should be sent to the backend and the response should not be stored). This is simple enough to do with the regular bypass/no_cache combination based on a cookie that is created when a user logs in.

----

It doesn't seem like a complicated scenario, but I can't get it to work just right.
Any help would be appreciated :)
Subject Author Posted

Skipping the proxy cache based on a cookie?

ehudros2 December 29, 2010 09:15AM

Re: Skipping the proxy cache based on a cookie?

ehudros2 December 30, 2010 08:27AM

Re: Skipping the proxy cache based on a cookie?

Dayo January 01, 2011 10:52AM

Re: Skipping the proxy cache based on a cookie?

ehudros2 January 02, 2011 07:28AM

Re: Skipping the proxy cache based on a cookie?

Dayo January 18, 2011 04:34PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 18, 2011 05:00PM

Re: Skipping the proxy cache based on a cookie?

agentzh January 19, 2011 11:08PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 20, 2011 03:38PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 18, 2011 05:18PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 01:44PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 01:45PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 02:06PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 02:07PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 05:19PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 02:58PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 04:49PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 19, 2011 03:20PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 03:43PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 04:22PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 19, 2011 04:10PM

Re: Skipping the proxy cache based on a cookie?

Eugaia January 19, 2011 04:30PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 19, 2011 04:36PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 19, 2011 08:30PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 20, 2011 03:08PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 21, 2011 03:51PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 21, 2011 03:52PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 21, 2011 04:17PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 177
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready