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
7c0b0d63
Commit
7c0b0d63
authored
Aug 10, 2015
by
Sean Bleier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #98 from chripede/master
RedisDummyCache
parents
9d53ad14
a15b2539
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
__init__.py
redis_cache/__init__.py
+1
-0
dummy.py
redis_cache/backends/dummy.py
+24
-0
No files found.
redis_cache/__init__.py
View file @
7c0b0d63
from
redis_cache.backends.single
import
RedisCache
from
redis_cache.backends.single
import
RedisCache
from
redis_cache.backends.multiple
import
ShardedRedisCache
from
redis_cache.backends.multiple
import
ShardedRedisCache
from
redis_cache.backends.dummy
import
RedisDummyCache
redis_cache/backends/dummy.py
0 → 100644
View file @
7c0b0d63
from
django.core.cache.backends.dummy
import
DummyCache
class
RedisDummyCache
(
DummyCache
):
def
ttl
(
self
,
key
):
return
0
def
delete_pattern
(
self
,
pattern
,
version
=
None
):
return
None
def
get_or_set
(
self
,
key
,
func
,
timeout
=
None
):
if
not
callable
(
func
):
raise
Exception
(
"Must pass in a callable"
)
return
func
()
def
reinsert_keys
(
self
):
return
None
def
persist
(
self
,
key
):
return
True
def
expire
(
self
,
key
,
timeout
):
return
True
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