###### options ###### # NOTE: all example config options below are COMMENTED OUT. # Remove the # at the start of the line before changing the values. # this is added to the start of all files loaded/saved # NOTE: can be a full path or a relative path # NOTE: the cache MUST have write-access to the specified directory # eg. $config{prefix} = "/tmp/gcache.example.com" would store files in "/tmp/gcache.example.com-*" # eg. $config{prefix} = "data/data" would store files in a data directory below the location of the CGI script #$config{prefix} = "data"; # will use "data-*" for data files # a large number of URLs are stored, and clients get a random selection # returned on each request. # URLs are removed from the list once they are $config{maxurlage} minutes old # if URL testing is enabled (see $config{checkurls} below) then caches # are tested with a ping request. failed caches are also stored for # $config{minurlcheck} days to prevent repeated retests on additional updates # return this many alternate cache urls #$config{maxv1urlret} = 10; # suggested range: between 10 and 20 #$config{maxv2urlret} = 5; # suggested range: between 5 and 10 # store this many URLs #$config{maxurlstore} = 500; # suggested range: 200 to 500 # remove URLs after this many minutes #$config{maxurlage} = 7.3*24*60; # in minutes - default 7.3 days # recheck URLs if they were last checked over this long ago #$config{minurlcheck} = 1.1*24*60; # in minutes - default 1.1 days # number of hosts to keep and return #$config{maxhost} = 20; # suggested range: between 10 and 40 # maximum age of a host entry, in minutes #$config{maxhostage} = 24*60; # in minutes - default 24 hours # set to non-zero to block clients which don't send a client and version parameter # (this setting only applys to v1 requests - v2 requests require a client string) # NOTE: in the original cache specs sending client/version was optional #$config{blockv1anon} = 0; # 0 = off (default), 1 = on # log cache stats #$config{enablestats} = 1; # 0 = off, 1 = on (default) # minimum time, in minutes, between updates from a single IP address #$config{updatelimit} = 55; # suggested range: 30 - 55 minutes # check each URL submitted works #$config{checkurls} = 1; # 0 = off, 1 = on (default) # check submitted IP addresses # (0: no check, 1: ip matches connecting host, 2: connect back to host to verify) # NOT IMPLEMENTED YET #$config{checkhosts} = 0; # HTTP proxy server to use when $config{checkurls} is 1 - undef for no proxy (default) #$config{proxyhost} = undef; #$config{proxyport} = undef; # request rate limiting # then number of requests from a single IP address in the given time period # set either to zero to disable this feature #$config{requestlimitcount} = 10; # suggested value: 0, or 5 - 10 #$config{requestlimittime} = 55; # suggested maximum 120 (2 hours) # should we answer old-style v1 requests? #$config{enablev1requests} = 1; # 0 = no, 1 = yes (default) # should we answer new v2 requests? #$config{enablev2requests} = 1; # 0 = no, 1 = yes (default) # note: if both v1/v2 are set to 0, act as if v1 is enabled # path to the style sheet # # default: "perlgcache.css" if found in the script directory, otherwise # "http://www.jonatkins.com/perlgcache/style/perlgcache.css" #$config{styleurl} = "perlgcache.css"; # if a cache is hosted on multiple independant servers then the stats reported will not # be correct. to solve this a list of URLs to the stats files can be given and the cache # will download them all and merge them in statfile requests and stat browsing # NOTE: each server needs a URL unique to that one host for this to work - pointing this # at the hostname used for cache requests will NOT work # if the list is empty (default) then the local stat file is loaded directly from disk #$config{statfileurls} = [ #]; # banned clients: a hash of client to version regular expression # to block every version of a client, use a line like # 'client' => '^.*$', #$config{bannedclients} = { #};