Django 1.9 cache.get_or_set issue while using DummyCache backend

34 views
Skip to first unread message

Oleksiy Ivanenko

unread,
Dec 1, 2015, 7:10:57 AM12/1/15
to Django users
Hi,

I'm trying to use Django 1.9rc2.
But I have issue while using django.core.cahe.cache.get_or_set with DummyCache backend.

from django.core.cache import cache

cache
.get_or_set('some_key', 'my_val')  # Always return None, instead of default value

This behaviour brakes lots of my tests.

Is this behaviour expected? Or we need to figure out some fixes for DummyCache backend?


---
Regards,
Oleksiy Ivanenko

Tim Graham

unread,
Dec 1, 2015, 8:31:21 AM12/1/15
to Django users
It seems to be an omission in the implementation. Feel free to create a Trac ticket and offer a patch if you can.

For future reference, please don't cross post between django-users (appropriate place for "is it a bug?" questions) and django-developers. Thanks!
Reply all
Reply to author
Forward
0 new messages