clear the entire cache or individual caches easily using the admin panel or management command.
Project description
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
tosettings.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
# clone repository
git clone https://github.com/fabiocaccamo/django-cache-cleaner.git && cd django-cache-cleaner
# create virtualenv and activate it
python -m venv venv && . venv/bin/activate
# upgrade pip
python -m pip install --upgrade pip
# install requirements
pip install -r requirements.txt -r requirements-test.txt
# install pre-commit to run formatters and linters
pre-commit install --install-hooks
# run tests
tox
# or
python runtests.py
# or
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. 🧟♂️
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_cache_cleaner-0.1.0.tar.gz
.
File metadata
- Download URL: django_cache_cleaner-0.1.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 636c84d917dad1d9873b7cfe9efc3716c9a52c2cfb481842911f0b083bcc9f50 |
|
MD5 | 48d2f721156587d480edebfc1edb477e |
|
BLAKE2b-256 | 532acda94b08d6591be28bf637cdfa25527fd731d53b9fb3830bdabaa563d1b5 |
Provenance
File details
Details for the file django_cache_cleaner-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: django_cache_cleaner-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0e8436be82f69a0928c85fc9f4cb8e7a36167e35f719dfc5c1807fefda308fa |
|
MD5 | bbe687a77f544dd9509f1c20a853cde4 |
|
BLAKE2b-256 | 02884c8255246f768e8b28b5bc1d0d9a76f8053f13b14c32a52a5a63bf59178a |