Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 35 lines (25 sloc) 1.59 kb
23e72a2 @justquick initial import
authored
1 Django Varnish
2 ================
3
4 Varnish is a state-of-the-art, high-performance HTTP accelerator.
5 For more information checkout `Varnish Site <http://varnish.projects.linpro.no/>`_
6
7 Django Varnish works with Varnish server(s) to manage caching of object pages.
8 It allows you to monitor certain models and when they are updated,
9 Django Varnish will purge the model's absolute_url on your frontend(s).
10 This ensures that object detail pages are served blazingly fast and are always up to date.
11 You may also go in and manually tweak things (such as your VCL configuration) using a management command.
12
13
220dedb @justquick updated readme
authored
14 Setup
15 -------
16 1. Install the `varnish python bindings <http://github.com/justquick/python-varnish>`_
17 2. Put ``varnishapp`` in your ``INSTALLED_APPS`` then set a few more settings.
1315875 Fixe some typos in README. Add Some error handling. Fix a bug in the tem...
yann.malet@gmail.com authored
18 3. Add ``(r'^admin/varnish/', include('varnishapp.urls')),`` to your urlconf
23e72a2 @justquick initial import
authored
19
220dedb @justquick updated readme
authored
20 Configure
21 ------------
23e72a2 @justquick initial import
authored
22 ``VARNISH_WATCHED_MODELS`` is a list of installed models whose absolute_urls you want to purge from your
23 Varnish cache upon saving. Example: ``('auth.user','profiles.profile')``
24
1315875 Fixe some typos in README. Add Some error handling. Fix a bug in the tem...
yann.malet@gmail.com authored
25 ``VARNISH_MANAGEMENT_ADDRS`` is a list of Varnish cache addresses (containing their management ports).
23e72a2 @justquick initial import
authored
26 Example ``('server1:6082','server2:6082')``
27
220dedb @justquick updated readme
authored
28 Management
29 -------------
23e72a2 @justquick initial import
authored
30
36ac8df @justquick updated readme
authored
31 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 <http://wiki.github.com/justquick/django-varnish/>`_.
220dedb @justquick updated readme
authored
32
33 Run the management command ``varnishmgt`` to blindly execute arguments to all Varnish backends. Example::
34
35 $ ./manage.py varnishmgt purge_url "/"
Something went wrong with that request. Please try again.