django-cache-cleaner


Namedjango-cache-cleaner JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
Summaryclear the entire cache or individual caches easily using the admin panel or management command.
upload_time2024-06-25 20:31:23
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT License Copyright (c) 2024-present Fabio Caccamo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords django cache caches cleaner clear clean cleanup command management purge
VCS
bugtrack_url
requirements django
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![](https://img.shields.io/pypi/pyversions/django-cache-cleaner.svg?color=3776AB&logo=python&logoColor=white)](https://www.python.org/)
[![](https://img.shields.io/pypi/djversions/django-cache-cleaner?color=0C4B33&logo=django&logoColor=white&label=django)](https://www.djangoproject.com/)

[![](https://img.shields.io/pypi/v/django-cache-cleaner.svg?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/django-cache-cleaner/)
[![](https://static.pepy.tech/badge/django-cache-cleaner/month)](https://pepy.tech/project/django-cache-cleaner)
[![](https://img.shields.io/github/stars/fabiocaccamo/django-cache-cleaner?logo=github&style=flat)](https://github.com/fabiocaccamo/django-cache-cleaner/stargazers)
[![](https://img.shields.io/pypi/l/django-cache-cleaner.svg?color=blue)](https://github.com/fabiocaccamo/django-cache-cleaner/blob/main/LICENSE.txt)

[![](https://results.pre-commit.ci/badge/github/fabiocaccamo/django-cache-cleaner/main.svg)](https://results.pre-commit.ci/latest/github/fabiocaccamo/django-cache-cleaner/main)
[![](https://img.shields.io/github/actions/workflow/status/fabiocaccamo/django-cache-cleaner/test-package.yml?branch=main&label=build&logo=github)](https://github.com/fabiocaccamo/django-cache-cleaner)
[![](https://img.shields.io/codecov/c/gh/fabiocaccamo/django-cache-cleaner?logo=codecov)](https://codecov.io/gh/fabiocaccamo/django-cache-cleaner)
<!-- [![](https://img.shields.io/codacy/grade/{id}?logo=codacy)](https://www.codacy.com/app/fabiocaccamo/django-cache-cleaner) -->
[![](https://img.shields.io/codeclimate/maintainability/fabiocaccamo/django-cache-cleaner?logo=code-climate)](https://codeclimate.com/github/fabiocaccamo/django-cache-cleaner/)
[![](https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&logoColor=black)](https://github.com/psf/black)
[![](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

# 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
python manage.py clear_cache
```

#### Clear individual caches
```python
python manage.py clear_cache news products
```

#### Clear all caches
```python
python manage.py clear_cache --all
```

## Testing
```bash
# 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](LICENSE.txt).

---

## Supporting

- :star: Star this project on [GitHub](https://github.com/fabiocaccamo/django-cache-cleaner)
- :octocat: Follow me on [GitHub](https://github.com/fabiocaccamo)
- :blue_heart: Follow me on [Twitter](https://twitter.com/fabiocaccamo)
- :moneybag: Sponsor me on [Github](https://github.com/sponsors/fabiocaccamo)

## See also

- [`django-admin-interface`](https://github.com/fabiocaccamo/django-admin-interface) - the default admin interface made customizable by the admin itself. popup windows replaced by modals. ๐Ÿง™ โšก

- [`django-colorfield`](https://github.com/fabiocaccamo/django-colorfield) - simple color field for models with a nice color-picker in the admin. ๐ŸŽจ

- [`django-extra-settings`](https://github.com/fabiocaccamo/django-extra-settings) - config and manage typed extra settings using just the django admin. โš™๏ธ

- [`django-maintenance-mode`](https://github.com/fabiocaccamo/django-maintenance-mode) - shows a 503 error page when maintenance-mode is on. ๐Ÿšง ๐Ÿ› ๏ธ

- [`django-redirects`](https://github.com/fabiocaccamo/django-redirects) - redirects with full control. โ†ช๏ธ

- [`django-treenode`](https://github.com/fabiocaccamo/django-treenode) - probably the best abstract model / admin for your tree based stuff. ๐ŸŒณ

- [`python-benedict`](https://github.com/fabiocaccamo/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`](https://github.com/fabiocaccamo/python-codicefiscale) - encode/decode Italian fiscal codes - codifica/decodifica del Codice Fiscale. ๐Ÿ‡ฎ๐Ÿ‡น ๐Ÿ’ณ

- [`python-fontbro`](https://github.com/fabiocaccamo/python-fontbro) - friendly font operations. ๐Ÿงข

- [`python-fsutil`](https://github.com/fabiocaccamo/python-fsutil) - file-system utilities for lazy devs. ๐ŸงŸโ€โ™‚๏ธ

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-cache-cleaner",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "Fabio Caccamo <fabio.caccamo@gmail.com>",
    "keywords": "django, cache, caches, cleaner, clear, clean, cleanup, command, management, purge",
    "author": null,
    "author_email": "Fabio Caccamo <fabio.caccamo@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/53/2a/cda94b08d6591be28bf637cdfa25527fd731d53b9fb3830bdabaa563d1b5/django_cache_cleaner-0.1.0.tar.gz",
    "platform": null,
    "description": "[![](https://img.shields.io/pypi/pyversions/django-cache-cleaner.svg?color=3776AB&logo=python&logoColor=white)](https://www.python.org/)\n[![](https://img.shields.io/pypi/djversions/django-cache-cleaner?color=0C4B33&logo=django&logoColor=white&label=django)](https://www.djangoproject.com/)\n\n[![](https://img.shields.io/pypi/v/django-cache-cleaner.svg?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/django-cache-cleaner/)\n[![](https://static.pepy.tech/badge/django-cache-cleaner/month)](https://pepy.tech/project/django-cache-cleaner)\n[![](https://img.shields.io/github/stars/fabiocaccamo/django-cache-cleaner?logo=github&style=flat)](https://github.com/fabiocaccamo/django-cache-cleaner/stargazers)\n[![](https://img.shields.io/pypi/l/django-cache-cleaner.svg?color=blue)](https://github.com/fabiocaccamo/django-cache-cleaner/blob/main/LICENSE.txt)\n\n[![](https://results.pre-commit.ci/badge/github/fabiocaccamo/django-cache-cleaner/main.svg)](https://results.pre-commit.ci/latest/github/fabiocaccamo/django-cache-cleaner/main)\n[![](https://img.shields.io/github/actions/workflow/status/fabiocaccamo/django-cache-cleaner/test-package.yml?branch=main&label=build&logo=github)](https://github.com/fabiocaccamo/django-cache-cleaner)\n[![](https://img.shields.io/codecov/c/gh/fabiocaccamo/django-cache-cleaner?logo=codecov)](https://codecov.io/gh/fabiocaccamo/django-cache-cleaner)\n<!-- [![](https://img.shields.io/codacy/grade/{id}?logo=codacy)](https://www.codacy.com/app/fabiocaccamo/django-cache-cleaner) -->\n[![](https://img.shields.io/codeclimate/maintainability/fabiocaccamo/django-cache-cleaner?logo=code-climate)](https://codeclimate.com/github/fabiocaccamo/django-cache-cleaner/)\n[![](https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&logoColor=black)](https://github.com/psf/black)\n[![](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n# django-cache-cleaner\nclear the entire cache or individual caches easily using the admin panel or management command.\n\n## Installation\n-   Run `pip install django-cache-cleaner`\n-   Add `cache_cleaner` to `settings.INSTALLED_APPS`\n-   Run `python manage.py migrate`\n-   Restart your application server\n\n## Usage\n\n### Admin\nTo clear caches using the admin panel:\n-   \u27a1\ufe0f Navigate to the `Cache Cleaner / Caches`\n-   \u2714\ufe0f Check the caches you want to clear\n-   \ud83e\uddf9 Select \"Clear selected caches\" from the actions menu\n-   \u2728 Done :)\n\n### Command\nThis package doesn't need any setting.\n\n#### Clear default cache\n```python\npython manage.py clear_cache\n```\n\n#### Clear individual caches\n```python\npython manage.py clear_cache news products\n```\n\n#### Clear all caches\n```python\npython manage.py clear_cache --all\n```\n\n## Testing\n```bash\n# clone repository\ngit clone https://github.com/fabiocaccamo/django-cache-cleaner.git && cd django-cache-cleaner\n\n# create virtualenv and activate it\npython -m venv venv && . venv/bin/activate\n\n# upgrade pip\npython -m pip install --upgrade pip\n\n# install requirements\npip install -r requirements.txt -r requirements-test.txt\n\n# install pre-commit to run formatters and linters\npre-commit install --install-hooks\n\n# run tests\ntox\n# or\npython runtests.py\n# or\npython -m django test --settings \"tests.settings\"\n```\n\n\n## License\nReleased under [MIT License](LICENSE.txt).\n\n---\n\n## Supporting\n\n- :star: Star this project on [GitHub](https://github.com/fabiocaccamo/django-cache-cleaner)\n- :octocat: Follow me on [GitHub](https://github.com/fabiocaccamo)\n- :blue_heart: Follow me on [Twitter](https://twitter.com/fabiocaccamo)\n- :moneybag: Sponsor me on [Github](https://github.com/sponsors/fabiocaccamo)\n\n## See also\n\n- [`django-admin-interface`](https://github.com/fabiocaccamo/django-admin-interface) - the default admin interface made customizable by the admin itself. popup windows replaced by modals. \ud83e\uddd9 \u26a1\n\n- [`django-colorfield`](https://github.com/fabiocaccamo/django-colorfield) - simple color field for models with a nice color-picker in the admin. \ud83c\udfa8\n\n- [`django-extra-settings`](https://github.com/fabiocaccamo/django-extra-settings) - config and manage typed extra settings using just the django admin. \u2699\ufe0f\n\n- [`django-maintenance-mode`](https://github.com/fabiocaccamo/django-maintenance-mode) - shows a 503 error page when maintenance-mode is on. \ud83d\udea7 \ud83d\udee0\ufe0f\n\n- [`django-redirects`](https://github.com/fabiocaccamo/django-redirects) - redirects with full control. \u21aa\ufe0f\n\n- [`django-treenode`](https://github.com/fabiocaccamo/django-treenode) - probably the best abstract model / admin for your tree based stuff. \ud83c\udf33\n\n- [`python-benedict`](https://github.com/fabiocaccamo/python-benedict) - dict subclass with keylist/keypath support, I/O shortcuts (base64, csv, json, pickle, plist, query-string, toml, xml, yaml) and many utilities. \ud83d\udcd8\n\n- [`python-codicefiscale`](https://github.com/fabiocaccamo/python-codicefiscale) - encode/decode Italian fiscal codes - codifica/decodifica del Codice Fiscale. \ud83c\uddee\ud83c\uddf9 \ud83d\udcb3\n\n- [`python-fontbro`](https://github.com/fabiocaccamo/python-fontbro) - friendly font operations. \ud83e\udde2\n\n- [`python-fsutil`](https://github.com/fabiocaccamo/python-fsutil) - file-system utilities for lazy devs. \ud83e\udddf\u200d\u2642\ufe0f\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024-present Fabio Caccamo  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "clear the entire cache or individual caches easily using the admin panel or management command.",
    "version": "0.1.0",
    "project_urls": {
        "Documentation": "https://github.com/fabiocaccamo/django-cache-cleaner#readme",
        "Download": "https://github.com/fabiocaccamo/django-cache-cleaner/releases",
        "Funding": "https://github.com/sponsors/fabiocaccamo/",
        "Homepage": "https://github.com/fabiocaccamo/django-cache-cleaner",
        "Issues": "https://github.com/fabiocaccamo/django-cache-cleaner/issues",
        "Twitter": "https://twitter.com/fabiocaccamo"
    },
    "split_keywords": [
        "django",
        " cache",
        " caches",
        " cleaner",
        " clear",
        " clean",
        " cleanup",
        " command",
        " management",
        " purge"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02884c8255246f768e8b28b5bc1d0d9a76f8053f13b14c32a52a5a63bf59178a",
                "md5": "bbe687a77f544dd9509f1c20a853cde4",
                "sha256": "b0e8436be82f69a0928c85fc9f4cb8e7a36167e35f719dfc5c1807fefda308fa"
            },
            "downloads": -1,
            "filename": "django_cache_cleaner-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bbe687a77f544dd9509f1c20a853cde4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11550,
            "upload_time": "2024-06-25T20:31:21",
            "upload_time_iso_8601": "2024-06-25T20:31:21.837971Z",
            "url": "https://files.pythonhosted.org/packages/02/88/4c8255246f768e8b28b5bc1d0d9a76f8053f13b14c32a52a5a63bf59178a/django_cache_cleaner-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "532acda94b08d6591be28bf637cdfa25527fd731d53b9fb3830bdabaa563d1b5",
                "md5": "48d2f721156587d480edebfc1edb477e",
                "sha256": "636c84d917dad1d9873b7cfe9efc3716c9a52c2cfb481842911f0b083bcc9f50"
            },
            "downloads": -1,
            "filename": "django_cache_cleaner-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "48d2f721156587d480edebfc1edb477e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12144,
            "upload_time": "2024-06-25T20:31:23",
            "upload_time_iso_8601": "2024-06-25T20:31:23.057079Z",
            "url": "https://files.pythonhosted.org/packages/53/2a/cda94b08d6591be28bf637cdfa25527fd731d53b9fb3830bdabaa563d1b5/django_cache_cleaner-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-25 20:31:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fabiocaccamo",
    "github_project": "django-cache-cleaner#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "django",
            "specs": [
                [
                    ">=",
                    "3.2"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "django-cache-cleaner"
}
        
Elapsed time: 4.16607s