django-pylibmc-threadsafe-1.0.1
توضیحات
Thread safe pylibmc cache pbackend for django
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | django-pylibmc-threadsafe-1.0.1 |
| نام | django-pylibmc-threadsafe |
| نسخه کتابخانه | 1.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | Miroslav Bendík <miroslav.bendik@gmail.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/django-pylibmc-threadsafe/ |
| مجوز | MIT |
============================================
Thread safe pylibmc cache backend for django
============================================
|version| |downloads| |license|
Default django pylibmc cache backend don't work correctly using multithread
uWSGI or celery worker.
This package uses separate connection for each context (thread or async context)
and can be used as direct replacement of
``django.core.cache.backends.memcached.PyLibMCCache``.
Install
-------
.. code:: bash
pip install django_pylibmc_threadsafe
Configuration
-------------
This package has only one additional option - ``ignore_exc`` used to suppress all
exceptions (behavior used in old
``django.core.cache.backends.memcached.MemcachedCache`` backend). All other
options are identical to ``django.core.cache.backends.memcached.PyLibMCCache``.
Example configuration:
.. code-block:: python
CACHES = {
'default': {
'BACKEND': 'django_pylibmc_threadsafe.PyLibMCCache',
'LOCATION': '127.0.0.1:11211',
'KEY_PREFIX': '',
'OPTIONS': {
'binary': True,
'ignore_exc': True,
'behaviors': {
'ketama': True,
}
}
},
.. |version| image:: https://badge.fury.io/py/django-pylibmc-threadsafe.svg
:target: https://pypi.python.org/pypi/django-pylibmc-threadsafe/
.. |downloads| image:: https://img.shields.io/pypi/dw/django-pylibmc-threadsafe.svg
:target: https://pypi.python.org/pypi/django-pylibmc-threadsafe/
.. |license| image:: https://img.shields.io/pypi/l/django-pylibmc-threadsafe.svg
:target: https://pypi.python.org/pypi/django-pylibmc-threadsafe/
نیازمندی
| مقدار | نام |
|---|---|
| - | django |
| - | pylibmc |
| - | pylint |
| - | pre-commit |
| - | bump2version |
| - | commitizen |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl django-pylibmc-threadsafe-1.0.1:
pip install django-pylibmc-threadsafe-1.0.1.whl
نصب پکیج tar.gz django-pylibmc-threadsafe-1.0.1:
pip install django-pylibmc-threadsafe-1.0.1.tar.gz