Opened 18 years ago

Closed 18 years ago

#3682 closed (worksforme)

View/Page Caching

Reported by: David Cramer <dcramer@…> Owned by: Jacob
Component: Uncategorized Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

There is a small issue with the cache_page system.

We have urls, which are structured in the form of www-<languagecode>.domain.com. The page caching, doesn't know the different between any of these urls, and seems to think www-en is the same as www-de (while the content is completely different).

Change History (4)

comment:1 by David Cramer <dcramer@…>, 18 years ago

With a bit more research (and discussion with server admins) I've learned cache_page requires vary headers, and mod_cache (lighttpd) doesn't allow vary headers (so we had them disabled).

Back to Squid I guess!

comment:2 by Collin Grady <cgrady@…>, 18 years ago

This is because django only sees the URL minus host, I believe.

comment:3 by James Bennett, 18 years ago

Collin, actually you can use the vary_on_headers decorator with any HTTP header, including Host (which is where the domain name will be).

comment:4 by James Bennett, 18 years ago

Resolution: worksforme
Status: newclosed

(and closing "worksforme" since vary_on_headers(some_view, 'Host') should do exactly what this is asking for)

Note: See TracTickets for help on using tickets.
Back to Top