Is there any difference between staticgenerator and useing Django's CACHE_BACKEND on the filesystem eg. CACHE_BACKEND = 'file:///var/tmp/django_cache' ?
相关问题
- Django __str__ returned non-string (type NoneType)
- Django & Amazon SES SMTP. Cannot send email
- Django check user group permissions
- Django restrict pages to certain users
- UnicodeEncodeError with attach_file on EmailMessag
相关文章
- Profiling Django with PyCharm
- Why doesn't Django enforce my unique_together
- MultiValueDictKeyError in Django admin
- Django/Heroku: FATAL: too many connections for rol
- Django is sooo slow? errno 32 broken pipe? dcramer
- Django: Replacement for the default ManyToMany Wid
- Upgrading transaction.commit_manually() to Django
- UnicodeEncodeError when saving ImageField containi
Yes.
StaticGenerator
generates static HTML files to bypass Django entirely.Any caching that django does such as the filesystem cache is still processed by django. A lot of the overhead of running your app is still there: django processes a request, goes through middlewares, checks filesystem cache for content, etc.
With StaticGenerator (and their example),
nginx
is serving theindex.html
page if it exists and if it doesn't, passes the request on to django on apache.The idea is to have
nginx
blissfully serving some html file thatStaticGenerator
updates on state changes (like saving a model).