Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justquick/django-varnish
Integration between Django and the Varnish HTTP accelerator using the management port and telnet
https://github.com/justquick/django-varnish
Last synced: 3 months ago
JSON representation
Integration between Django and the Varnish HTTP accelerator using the management port and telnet
- Host: GitHub
- URL: https://github.com/justquick/django-varnish
- Owner: justquick
- Created: 2009-09-23T15:39:26.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2014-06-28T07:38:08.000Z (over 10 years ago)
- Last Synced: 2024-10-31T12:50:17.758Z (3 months ago)
- Language: Python
- Homepage:
- Size: 251 KB
- Stars: 175
- Watchers: 7
- Forks: 28
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Django Varnish
================Varnish is a state-of-the-art, high-performance HTTP accelerator.
For more information checkout `Varnish Site `_Django Varnish works with Varnish server(s) to manage caching of object pages.
It allows you to monitor certain models and when they are updated,
Django Varnish will purge the model's absolute_url on your frontend(s).
This ensures that object detail pages are served blazingly fast and are always up to date.
You may also go in and manually tweak things (such as your VCL configuration) using a management command.Setup
-------
1. Install the `varnish python bindings `_
2. Put ``varnishapp`` in your ``INSTALLED_APPS`` then set a few more settings.
3. Add ``(r'^admin/varnish/', include('varnishapp.urls')),`` to your urlconfConfigure
------------
``VARNISH_WATCHED_MODELS`` is a list of installed models whose absolute_urls you want to purge from your
Varnish cache upon saving. Example: ``('auth.user','profiles.profile')````VARNISH_MANAGEMENT_ADDRS`` is a list of Varnish cache addresses (containing their management ports).
Example ``('server1:6082','server2:6082')``Management
-------------You can view the status of your Varnish cache servers by going to ``/admin/varnish/`` and being a superuser. `Here is what it looks like in production `_.
Run the management command ``varnishmgt`` to blindly execute arguments to all Varnish backends. Example::
$ ./manage.py varnishmgt purge_url "/"