Commit 665318c2 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Revert "Stop referencing the module index, since no such thing exists"

This commit included som unfinished work, so revert it.

This reverts commit d4f456f0.
parent d4f456f0
......@@ -29,6 +29,7 @@ Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
......
......@@ -83,11 +83,10 @@ backend.set_health matcher state
Sets the health state on a specific backend. This is useful if
you want to take a certain backend out of sirculations.
ban [-t ttl] [-g grace] [-k keep] *field operator argument* [&& field operator argument [...]]
Sets the given ttl, grace and keep for objects matching the ban
expression. If none of ttl, grace or keep are given, they all
get set to -1, definitively removing the object from cache. See
*Ban Expressions* for more documentation and examples.
ban *field operator argument* [&& field operator argument [...]]
Immediately invalidate all documents matching the ban
expression. See *Ban Expressions* for more documentation and
examples.
ban.list
All requests for objects from the cache are matched against
......@@ -200,6 +199,7 @@ The argument could be a quoted string, a regexp, or an integer.
Integers can have "KB", "MB", "GB" or "TB" appended for size related
fields.
Scripting
---------
......@@ -295,23 +295,18 @@ EXAMPLES
Simple example: All requests where req.url exactly matches the string
/news are banned from the cache::
ban req.url == "/news"
Example: Same as above, but explicit in what the TTL, grace and keep
values are set to.
ban -t -1s -g -1s -k -1s req.url == "/news"
req.url == "/news"
Example: Set grace for all objects whose URL end with `.ogg` to 60
seconds. Does not change the TTL or the keep of the objects.
Example: Ban all documents where the name does not end with ".ogg",
and where the size of the object is greater than 10 megabytes::
ban -g 60s req.url !~ "\.ogg$"
req.url !~ "\.ogg$" && obj.size > 10MB
Example: Ban all documents where the serving host is "example.com"
or "www.example.com", and where the Set-Cookie header received from
the backend contains "USERID=1663"::
ban req.http.host ~ "^(?i)(www\.)example.com$" && obj.http.set-cookie ~ "USERID=1663"
req.http.host ~ "^(?i)(www\.)example.com$" && obj.http.set-cookie ~ "USERID=1663"
SEE ALSO
========
......
......@@ -324,11 +324,8 @@ regsub(str, regex, sub)
regsuball(str, regex, sub)
As regsub() but this replaces all occurrences.
ban(ban expression [, ttl= $ttl][, grace= $grace][, keep= $keep])
Sets the given ttl, grace and keep for objects matching the ban
expression. If none of ttl, grace or keep are given, they all get
set to -1, definitively removing the object from cache. See *Ban
Expressions* in varnish-cli(7) for more documentation and examples.
ban(ban expression)
Bans all objects in cache that match the expression.
Subroutines
~~~~~~~~~~~
......@@ -959,34 +956,11 @@ for object invalidation:
}
}
TTL, grace and keep – when are objects removed from the cache?
--------------------------------------------------------------
There are two mechanisms that remove objects from the cache: LRU,
which happens when the cache is full, and expiry.
Objects exist in one of multiple states:
* Valid: The TTL has not yet expired and the object is served as normal
* Graced: The TTL has expired, but its grace period has not expired.
It is a grace candidate and might be delivered to clients. See grace.
* Kept: The TTL has expired, but the keep period has not yet
expired. The object is a candidate to be used for conditional
requests to the backend.
The keep and grace intervals run in parallel, so an object will be
kept in the cache until the time period specified by the maximum of
TTL + grace and TTL + keep has expired. Once all the timers have
expired, the object will be removed from the cache and any requests
for it will cause a completely new object to be fetched from the
backend.
SEE ALSO
========
* varnishd(1)
* vmod_std(7)
* varnish-cli(7)
HISTORY
=======
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment