Python django.conf.settings.SESSION_CACHE_ALIAS Examples
The following are 12
code examples of django.conf.settings.SESSION_CACHE_ALIAS().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
django.conf.settings
, or try the search function
.
Example #1
Source File: models.py From django-qsessions with MIT License | 6 votes |
def delete(self): """ Delete sessions from both DB and cache (first cache, then DB) """ # noinspection PyPep8Naming SessionStore = Session.get_session_store_class() prefix = getattr(SessionStore, "cache_key_prefix", None) if prefix is not None: caches[settings.SESSION_CACHE_ALIAS].delete_many(prefix + s.session_key for s in self) return super(SessionQuerySet, self).delete()
Example #2
Source File: cache.py From GTDWeb with GNU General Public License v2.0 | 5 votes |
def __init__(self, session_key=None): self._cache = caches[settings.SESSION_CACHE_ALIAS] super(SessionStore, self).__init__(session_key)
Example #3
Source File: cached_db.py From GTDWeb with GNU General Public License v2.0 | 5 votes |
def __init__(self, session_key=None): self._cache = caches[settings.SESSION_CACHE_ALIAS] super(SessionStore, self).__init__(session_key)
Example #4
Source File: models.py From django-qsessions with MIT License | 5 votes |
def delete(self, *args, **kwargs): """ Delete session from both DB and cache (first cache, then DB) """ # noinspection PyPep8Naming SessionStore = Session.get_session_store_class() prefix = getattr(SessionStore, "cache_key_prefix", None) if prefix is not None: caches[settings.SESSION_CACHE_ALIAS].delete(prefix + self.session_key) return super(Session, self).delete(*args, **kwargs)
Example #5
Source File: cache.py From bioforum with MIT License | 5 votes |
def __init__(self, session_key=None): self._cache = caches[settings.SESSION_CACHE_ALIAS] super().__init__(session_key)
Example #6
Source File: cached_db.py From bioforum with MIT License | 5 votes |
def __init__(self, session_key=None): self._cache = caches[settings.SESSION_CACHE_ALIAS] super().__init__(session_key)
Example #7
Source File: cache.py From Hands-On-Application-Development-with-PyCharm with MIT License | 5 votes |
def __init__(self, session_key=None): self._cache = caches[settings.SESSION_CACHE_ALIAS] super().__init__(session_key)
Example #8
Source File: cached_db.py From Hands-On-Application-Development-with-PyCharm with MIT License | 5 votes |
def __init__(self, session_key=None): self._cache = caches[settings.SESSION_CACHE_ALIAS] super().__init__(session_key)
Example #9
Source File: cache.py From openhgsenti with Apache License 2.0 | 5 votes |
def __init__(self, session_key=None): self._cache = caches[settings.SESSION_CACHE_ALIAS] super(SessionStore, self).__init__(session_key)
Example #10
Source File: cached_db.py From openhgsenti with Apache License 2.0 | 5 votes |
def __init__(self, session_key=None): self._cache = caches[settings.SESSION_CACHE_ALIAS] super(SessionStore, self).__init__(session_key)
Example #11
Source File: cache.py From python2017 with MIT License | 5 votes |
def __init__(self, session_key=None): self._cache = caches[settings.SESSION_CACHE_ALIAS] super(SessionStore, self).__init__(session_key)
Example #12
Source File: cached_db.py From python2017 with MIT License | 5 votes |
def __init__(self, session_key=None): self._cache = caches[settings.SESSION_CACHE_ALIAS] super(SessionStore, self).__init__(session_key)