Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
Django-Redis-Cache
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shared
Django-Redis-Cache
Commits
686cd3fc
Commit
686cd3fc
authored
May 11, 2010
by
Jannis Leidel
Committed by
Sean Bleier
May 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bail if not able to import redis-py.
parent
f6793404
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
cache.py
redis_cache/cache.py
+9
-3
No files found.
redis_cache/cache.py
View file @
686cd3fc
from
django.core.cache.backends.base
import
BaseCache
,
InvalidCacheBackendError
from
django.utils.encoding
import
smart_unicode
,
smart_str
from
django.utils.datastructures
import
SortedDict
try
:
import
cPickle
as
pickle
except
ImportError
:
import
pickle
import
redis
from
django.core.cache.backends.base
import
BaseCache
from
django.utils.encoding
import
smart_unicode
,
smart_str
try
:
import
redis
except
:
raise
InvalidCacheBackendError
(
"Redis cache backend requires the 'redis-py' library"
)
class
CacheClass
(
BaseCache
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment