Add type check for cache
This commit is contained in:
parent
f1ba0e79c1
commit
0ea822f7a0
10 changed files with 35 additions and 13 deletions
|
@ -49,7 +49,7 @@ class PageVoteVoter(models.Model):
|
|||
verbose_name_plural = _("pagevote votes")
|
||||
|
||||
|
||||
@cache_wrapper(prefix="gocp")
|
||||
@cache_wrapper(prefix="gocp", expected_type=PageVote)
|
||||
def _get_or_create_pagevote(content_type, object_id):
|
||||
pagevote, created = PageVote.objects.get_or_create(
|
||||
content_type=content_type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue