[MKDoc-modules] Re: [BUG] MKDoc::Apache_Cache only serves pages already cached

Bruno Postle bruno at webarchitects.co.uk
Wed Jan 28 16:04:05 GMT 2004


Here's an example policy file that is tailored for MKDoc

-- 
Bruno
-------------- next part --------------
# example of an MKDoc configuration

# some different kinds of requests

CONDITION is_slash       $ENV{PATH_INFO} =~ /\/$/

CONDITION is_sitemap     $ENV{PATH_INFO} =~ /\/\.sitemap\.html$/
CONDITION is_print       $ENV{PATH_INFO} =~ /\/\.print\.html$/
CONDITION is_rdf         $ENV{PATH_INFO} =~ /\/\.meta\.rdf$/
CONDITION is_rss         $ENV{PATH_INFO} =~ /\/\.headlines\.rss$/
CONDITION is_search      $ENV{PATH_INFO} =~ /\/\.search\.html$/

CONDITION is_photo       $ENV{PATH_INFO} =~ /\/[a-z0-9-]+\.[a-z]+,html$/

CONDITION is_poll        $ENV{PATH_INFO} =~ /\/poll(-[0-9]+)?\.html$/

CONDITION is_discussion  $ENV{PATH_INFO} =~ /\/discussion(-[0-9]+)?\.html$/
CONDITION is_postmessage $ENV{PATH_INFO} =~ /\/discussion(-[0-9]+)?\.html,post$/
CONDITION is_viewmessage $ENV{PATH_INFO} =~ /\/discussion(-[0-9]+)?\.html,view$/

CONDITION is_subscribe   $ENV{PATH_INFO} =~ /\/\.account\.subscribe$/
CONDITION is_reminder    $ENV{PATH_INFO} =~ /\/\.account\.reminder$/
CONDITION is_preferences $ENV{PATH_INFO} =~ /\/\.account\.preferences$/
CONDITION is_remove      $ENV{PATH_INFO} =~ /\/\.account\.remove$/

# this won't work in all sorts of conditions
CONDITION is_public      $ENV{SERVER_NAME} =~ /^www\./
CONDITION is_user        $ENV{SERVER_NAME} =~ /^users\./

# some different times

RET_VALUE never       "never"
RET_VALUE ten_minutes "10 min"
RET_VALUE eight_hours "8 hours"
RET_VALUE one_day     "24 hours"

# the control list

RULE never        WHEN is_user

RULE eight_hours  WHEN is_slash
RULE one_day      WHEN is_sitemap
RULE eight_hours  WHEN is_print
RULE eight_hours  WHEN is_rdf
RULE eight_hours  WHEN is_rss
RULE eight_hours  WHEN is_search
RULE eight_hours  WHEN is_photo
RULE eight_hours  WHEN is_poll
RULE eight_hours  WHEN is_discussion
RULE eight_hours  WHEN is_postmessage
RULE eight_hours  WHEN is_viewmessage




More information about the MKDoc-modules mailing list