On Dec 6, 2005, at 12:28 AM, Adrian Holovaty wrote:
Finally, along those lines, we could introduce a vary_on_get decorator, which, used with the NO_GET_PARAMS setting, would be an opt-in signifying a view *does* rely on query string. This could be for stuff like search engines, which do vary based on the query string (e.g. /search/?q=foo). In this case, though, it'd be nice to be able to specify the variables that are valid. For example, with the decorator @vary_on_get('foo', 'bar'), the cache would store separate pages for /search/?foo=1 and /search/?bar=1, but it would use the same cache for /search/?foo=1 and /search/?foo=1&gonzo=2, because "gonzo" isn't specified in "vary_on_get" and thus would be ignored.
This sounds like the right idea to me: explicitly state which GET params invalidate the cache.
Jacob