diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2010-03-01 20:11:24 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2010-03-01 20:11:24 +0000 |
| commit | b3a56755d7f0761a14541bd6d86b9960bb5de202 (patch) | |
| tree | e5d996457c2219f663ef92c57bf812aba2f668e5 /django/core | |
| parent | 6e748b5db4ea6db78ce389f474c2fb78ee3976ed (diff) | |
Fixed #11012: don't needless convert cache values to unicode.
This means you can now successfully store binary blogs, such as compressed data,
in the cache.
Thanks to Matt Croydon for the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core')
| -rw-r--r-- | django/core/cache/backends/memcached.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/django/core/cache/backends/memcached.py b/django/core/cache/backends/memcached.py index e254527cea..1e4e482b11 100644 --- a/django/core/cache/backends/memcached.py +++ b/django/core/cache/backends/memcached.py @@ -43,15 +43,9 @@ class CacheClass(BaseCache): val = self._cache.get(smart_str(key)) if val is None: return default - else: - if isinstance(val, basestring): - return smart_unicode(val) - else: - return val + return val def set(self, key, value, timeout=0): - if isinstance(value, unicode): - value = value.encode('utf-8') self._cache.set(smart_str(key), value, self._get_memcache_timeout(timeout)) def delete(self, key): |
