[MKDoc-commit] Added a default policy for MKDoc::Apache_Cache

bruno at mkdoc.demon.co.uk bruno at mkdoc.demon.co.uk
Wed Dec 1 16:18:30 GMT 2004


Log Message:
-----------
Added a default policy for MKDoc::Apache_Cache

Added Files:
-----------
    mkd/conf:
        cache_policy.conf

-------------- next part --------------
--- /dev/null
+++ conf/cache_policy.conf
@@ -0,0 +1,58 @@
+# 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$/
+
+CONDITION is_user        $ENV{MKD__PLUGIN_LIST} !~ /\/www\.conf$/
+
+# some different times
+
+RET_VALUE never       0
+RET_VALUE ten_minutes "10 min"
+RET_VALUE eight_hours "8 hours"
+RET_VALUE one_day     "24 hours"
+RET_VALUE one_week    "7 days"
+
+# non-default retrieval keys
+
+RET_VALUE no_query_string      $ENV{REQUEST_METHOD} . ":" . $ENV{SERVER_NAME} . $ENV{PATH_INFO}
+RET_VALUE dev_null             'dev_null'
+
+# the control list
+
+RULE never dev_null       WHEN is_user
+RULE never dev_null       WHEN is_poll
+RULE never dev_null       WHEN is_search
+
+RULE one_day     no_query_string  WHEN is_sitemap
+
+RULE eight_hours no_query_string  WHEN is_slash
+RULE eight_hours no_query_string  WHEN is_print
+RULE eight_hours no_query_string  WHEN is_rdf
+RULE eight_hours no_query_string  WHEN is_rss
+RULE eight_hours no_query_string  WHEN is_photo
+
+RULE eight_hours                  WHEN is_discussion
+RULE eight_hours                  WHEN is_viewmessage
+
+


More information about the MKDoc-commit mailing list