Skip to main content

A Django app for the caching api data while get method and removing after data altered or created.

Project description

django-cache-middleware

django-cache-middleware is a Django app for the caching api data while get method and removing after data altered or created.

Installation

* pip install django-cache-middleware
* Add ``cache_middleware`` to your ``INSTALLED_APPS``
* Add ``cache_middleware.middlewares.CacheMiddleware`` to your ``MIDDLEWARE``
* set django redis for your project (https://pypi.org/project/django-redis/) 

::

Setup in settings

* REMOVE_RELATED_CACHE : bool # default True # remove related model data i.e o2m, m2o, m2m, 020 dat 
* CACHE_REMOVE_TIMEOUT : integer | None # default None # cache removing time
* BASE_API_URL : str # default /api/ # base api url
* CACHE_NAME : str # default settings.ROOT_URLCONF.split('.')[0] #  name of cache base key name

::

Compatibility

{py37, py38, py310}-django{4.* above}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cache_middleware_django-0.0.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file cache_middleware_django-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cache_middleware_django-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4511af115127781bc98b93705d245240d74c2d4d4645b5da7f16909212711ed1
MD5 cc37bcd55c6a4f390c45e6bd574ead9a
BLAKE2b-256 5c98e6f0aad99aa96fd5b675ca0dd3d56639a80ce040df1e95df4a2942ae447d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page