GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
VMOD_SOFTPURGE(Soft) VMOD_SOFTPURGE(Soft)

vmod_softpurge - purge vmod

import softpurge [from "path"] ;

Softpurge is cache invalidation in Varnish that reduces TTL but keeps the grace value of a resource.
This makes it possible to serve stale content to users if the backend is unavailable and fresh content can not be fetched.
Example:
vcl 4.0;
import softpurge;
backend default { .host = "192.0.2.11"; .port = "8080"; }
sub vcl_recv { # Return early to avoid return(pass) by builtin VCL. if (req.method == "PURGE") { return (hash); } }
sub vcl_backend_response { # Set object grace so we keep them around after TTL has expired. set beresp.grace = 10m; }
sub vcl_hit { if (req.method == "PURGE") { softpurge.softpurge(); return (synth(200, "Successful softpurge")); } }
sub vcl_miss { if (req.method == "PURGE") { softpurge.softpurge(); return (synth(200, "Successful softpurge")); } }


VOID softpurge()

Prototype
VOID softpurge()

Performs a soft purge. Valid in vcl_hit and vcl_miss.
Example:
sub vcl_hit {
    if (req.method == "PURGE") {
        softpurge.softpurge();
    }
}



Search for    or go to Top of page |  Section other |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.