跳转到主要内容

通过管理面板或管理命令轻松清除整个缓存或单个缓存。

项目描述

django-cache-cleaner

通过管理面板或管理命令轻松清除整个缓存或单个缓存。

安装

  • 运行 pip install django-cache-cleaner
  • cache_cleaner 添加到 settings.INSTALLED_APPS
  • 运行 python manage.py migrate
  • 重新启动您的应用程序服务器

用法

管理界面

要使用管理界面清除缓存

  • ➡️ 导航到 Cache Cleaner / Caches
  • ✔️ 选择您要清除的缓存
  • 🧹 从操作菜单中选择“清除选定的缓存”
  • ✨ 完成 :)

命令

此包不需要任何设置。

清除默认缓存

python manage.py clear_cache

清除单个缓存

python manage.py clear_cache news products

清除所有缓存

python manage.py clear_cache --all

测试

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

许可

MIT 许可证 下发布。


支持

  • :star: 在 GitHub 上星标此项目
  • :octocat: 在 GitHub 上关注我
  • :blue_heart: 在 Twitter 上关注我
  • :moneybag: 在 Github 上赞助我

另请参阅

  • django-admin-interface - 由管理员本身定制的默认管理界面。将弹出窗口替换为模态窗口。 🧙 ⚡

  • django-colorfield - 模型中简单颜色字段,管理后台有漂亮的颜色选择器。 🎨

  • django-extra-settings - 使用 django 管理后台配置和管理类型化额外设置。 ⚙️

  • django-maintenance-mode - 维护模式下显示 503 错误页面。 🚧 🛠️

  • django-redirects - 完全控制的重定向。 ↪️

  • django-treenode - 可能是你基于树的结构的东西中最好的抽象模型/管理。 🌳

  • python-benedict - 支持键列表/键路径的字典子类,I/O 快捷方式(base64、csv、json、pickle、plist、查询字符串、toml、xml、yaml)和许多实用工具。 📘

  • python-codicefiscale - 编码/解码意大利税号 - Codifica/decodifica del Codice Fiscale。 🇮🇹 💳

  • python-fontbro - 友好的字体操作。 🧢

  • python-fsutil - 懒惰开发者的文件系统实用工具。 🧟‍♂️

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于 安装软件包 的信息。

源代码分布

django_cache_cleaner-0.1.0.tar.gz (12.1 kB 查看哈希值)

上传时间 源代码

构建分布

django_cache_cleaner-0.1.0-py3-none-any.whl (11.6 kB 查看哈希值)

上传时间 Python 3

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面