Skip to content

๐Ÿงนโœจ clear the entire cache or individual caches using the admin or management command.

License

Notifications You must be signed in to change notification settings

fabiocaccamo/django-cache-cleaner

Repository files navigation

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

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. ๐ŸงŸโ€โ™‚๏ธ