Skip to main content

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 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

# 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


Download files

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

Source Distribution

django_cache_cleaner-0.2.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

django_cache_cleaner-0.2.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file django_cache_cleaner-0.2.0.tar.gz.

File metadata

  • Download URL: django_cache_cleaner-0.2.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for django_cache_cleaner-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e3405c9a0edc4e48f2b6187de85d7ef1e90490bbb4767f4b75d0a910f50f8ad2
MD5 36632c64e566bf7cc060bec3818e61c1
BLAKE2b-256 3f5f8310049b868586a843a189db4855899859a73ce1e7ba98c77bcd6b0baefe

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_cache_cleaner-0.2.0.tar.gz:

Publisher: create-release.yml on fabiocaccamo/django-cache-cleaner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_cache_cleaner-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_cache_cleaner-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a9cf25a2a99ffb68f51e56e233f99379e3f4ed031e226c027e6a40677ebe709
MD5 88d0a827cfa82669c74518cc67c31bd5
BLAKE2b-256 5f00fce6278f728862401f9ed908dcb84ae69c35b1b51b2b9ae4febb85106d91

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_cache_cleaner-0.2.0-py3-none-any.whl:

Publisher: create-release.yml on fabiocaccamo/django-cache-cleaner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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