Skip to content

Conversation

@Wilfred
Copy link
Contributor

@Wilfred Wilfred commented Jan 22, 2014

Johnny Cache builds a cache key by repeatedly calling key.update. This is equivalent to concatenating all the parameters together and generating a hash.

As a result, Johnny Cache confuses the following queries:

Foo.objects.get(x="foo", y="bar")
Foo.objects.get(x="foob", y="ar")

Bar.objects.get(x=1, y=21)
Bar.objects.get(x=12, y=1)

This pull request inserts a separator between parameters, so we don't get confused. This code is heavily based on the patch written by @milos-u.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant