IBM Lotus Domino - reverse proxy - do not cache if authenticated web user (based on cookie)
malayter at gmail.com
Mon Apr 5 19:07:08 MSD 2010
On Wed, Mar 31, 2010 at 4:42 AM, <Pekka.Panula at sofor.fi> wrote:
> Basicly currently if you have IBM Lotus Domino backends, you cant use
> proxy_cache, which sucks, because those applications do use lots of upstream
> resources, and which by using even small caches can be reduced much...
> Basicly you have to disable caching if you want your web pages to behave
> without problems.
> I dont have lots of ideas how to fix, but what if it was possible to disable
> nginx caching based if user has some cookie set, i mean as if there was no
> proxy_cache variables set at all, so it always did fetch data from upstream
> if certain cookie is on. Is this even possible to code on nginx?
> Unfortunately my C coding skills are somewhat not-exists. Because Domino
> sets session cookie when user is authenticated, that way nginx would know if
> user is anonymous or some authenticated user that is prob. doing some
> updates, like new docs, etc. to domino application, so it whould prob. be
> anyway not to cache hes content...
Actually, this isn't really an nginx problem; other proxy caches like
Squid, Varnish, and Microsoft ISA would have similar problems with
Domino. If there is truly no cachabiity information at all being set
by the application, there is nothing sensible a cache can do (except
*not* cache, which is what the HTTP specification requires and should
also be the default for most proxy caches).
Probably the best you can do is make a second RegEx-based location for
"known-cachable" items that includes nginx cache directives with
default times. Are images even served with GIF/JPEG/PNG extensions in
the URI by Domino?
As far as caching being turned on or off based on the cookie, the
workarounds I mentioned before (adding it into the proxy_cache_key, or
redirecting to a different internal location via "if") might be made
to work in an ugly fashion.
More information about the nginx