Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
9d5e8070
Commit
9d5e8070
authored
Mar 20, 2014
by
Lasse Karstensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting
parent
cfb7fd2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
increasing-your-hitrate.rst
doc/sphinx/users-guide/increasing-your-hitrate.rst
+8
-10
No files found.
doc/sphinx/users-guide/increasing-your-hitrate.rst
View file @
9d5e8070
...
...
@@ -235,9 +235,7 @@ Age
~~~
Varnish adds an 'Age' header to indicate how long the object has been
kept inside Varnish. You can grep out 'Age' from `varnishlog` like this::
varnishlog -i TxHeader -I ^Age
kept inside Varnish. You can grep out 'Age' from `varnishlog` with ``varnishlog -i TxHeader -I ^Age``.
Pragma
~~~~~~
...
...
@@ -247,10 +245,10 @@ header. You could easily add support for this header in VCL.
In `vcl_backend_response`::
if (beresp.http.Pragma ~ "nocache") {
if (beresp.http.Pragma ~ "nocache") {
set beresp.uncacheable = true;
set beresp.ttl = 120s; // how long not to cache this url.
}
set beresp.ttl = 120s; // how long not to cache this url.
}
Authorization
~~~~~~~~~~~~~
...
...
@@ -258,12 +256,12 @@ Authorization
If Varnish sees an 'Authorization' header it will pass the request. If
this is not what you want you can unset the header.
Overriding the time-to-live (
ttl
)
Overriding the time-to-live (
TTL
)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sometimes your backend will misbehave. It might, depending on your
setup, be easier to override the
ttl in Varnish tha
n to fix your
somewhat cumbersome backend.
setup, be easier to override the
TTL in Varnish the
n to fix your
somewhat cumbersome backend.
You need VCL to identify the objects you want and then you set the
'beresp.ttl' to whatever you want::
...
...
@@ -274,7 +272,7 @@ You need VCL to identify the objects you want and then you set the
}
}
This example will set the
ttl
to 5 days for the old legacy stuff on
This example will set the
TTL
to 5 days for the old legacy stuff on
your site.
Forcing caching for certain requests and certain responses
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment