![](https://img.shields.io/pypi/djversions/django-cache-cleaner?color=0C4B33&logo=django&logoColor=white&label=django)
![](https://img.shields.io/pypi/l/django-cache-cleaner.svg?color=blue)
![](https://img.shields.io/codecov/c/gh/fabiocaccamo/django-cache-cleaner?logo=codecov)
![](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)
django-cache-cleaner
clear the entire cache or individual caches easily using the admin panel or management command.
Installation
- Run
pip install django-cache-cleaner
- Add
cache_cleaner
to settings.INSTALLED_APPS
- Run
python manage.py migrate
- Restart your application server
Usage
Admin
To clear caches using the admin panel:
- ➡️ Navigate to the
Cache Cleaner / Caches
- ✔️ Check the caches you want to clear
- 🧹 Select "Clear selected caches" from the actions menu
- ✨ Done :)
Command
This package doesn't need any setting.
Clear default cache
python manage.py clear_cache
Clear individual caches
python manage.py clear_cache news products
Clear all caches
python manage.py clear_cache --all
Testing
git clone https://github.com/fabiocaccamo/django-cache-cleaner.git && cd django-cache-cleaner
python -m venv venv && . venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-test.txt
pre-commit install --install-hooks
tox
python runtests.py
python -m django test --settings "tests.settings"
License
Released under MIT License.
Supporting
- :star: Star this project on GitHub
- :octocat: Follow me on GitHub
- :blue_heart: Follow me on Twitter
- :moneybag: Sponsor me on Github
See also
-
django-admin-interface
- the default admin interface made customizable by the admin itself. popup windows replaced by modals. 🧙 ⚡
-
django-colorfield
- simple color field for models with a nice color-picker in the admin. 🎨
-
django-extra-settings
- config and manage typed extra settings using just the django admin. ⚙️
-
django-maintenance-mode
- shows a 503 error page when maintenance-mode is on. 🚧 🛠️
-
django-redirects
- redirects with full control. ↪️
-
django-treenode
- probably the best abstract model / admin for your tree based stuff. 🌳
-
python-benedict
- dict subclass with keylist/keypath support, I/O shortcuts (base64, csv, json, pickle, plist, query-string, toml, xml, yaml) and many utilities. 📘
-
python-codicefiscale
- encode/decode Italian fiscal codes - codifica/decodifica del Codice Fiscale. 🇮🇹 💳
-
python-fontbro
- friendly font operations. 🧢
-
python-fsutil
- file-system utilities for lazy devs. 🧟♂️