Skip to content

Instantly share code, notes, and snippets.

@jbalogh
Created December 16, 2009 00:18
Show Gist options
  • Select an option

  • Save jbalogh/257450 to your computer and use it in GitHub Desktop.

Select an option

Save jbalogh/257450 to your computer and use it in GitHub Desktop.
create a key from whatever filters are in the query => query_key
as we iterate through objects in the queryset, ask them for their cache key => object_key
maintain maps of object_key => [query_key]
when object_key is invalidated, invalidate all its mapped query_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment