問題描述: Python manage.py runserver ,禁用緩存,及時修改反饋到瀏覽器web
解決辦法:chrome
使用dummy cache:django
Finally, Django comes with a 「dummy」 cache that doesn’t actually cache – it just implements the cache interface without doing anything.瀏覽器
This is useful if you have a production site that uses heavy-duty caching in various places but a development/test environment where you don’t want to cache and don’t want to have to change your code to special-case the latter. To activate dummy caching, set BACKEND
like so:緩存
CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', } }
另外,chrome瀏覽器也須要設置,F12打開devtools,在network 標籤下勾選 禁用緩存!
或者,使用插件:https://chrome.google.com/webstore/detail/jpfbieopdmepaolggioebjmedmclkbaphttp://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development