[MKDoc-commit] Added example MKDoc::Apache_Cache cache_policy file
bruno at mkdoc.demon.co.uk
bruno at mkdoc.demon.co.uk
Mon Jan 3 18:58:48 GMT 2005
Log Message:
-----------
Added example MKDoc::Apache_Cache cache_policy file
Tags:
----
mkdoc-1-6
Added Files:
-----------
mkd/conf:
cache_policy.conf
-------------- next part --------------
--- /dev/null
+++ conf/cache_policy.conf
@@ -0,0 +1,59 @@
+# 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 defined $ENV{REMOTE_USER}
+
+# some different times
+
+RET_VALUE never 0
+RET_VALUE ten_minutes "10 min"
+RET_VALUE thirty_minutes "30 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 thirty_minutes no_query_string WHEN is_slash
+RULE thirty_minutes no_query_string WHEN is_print
+RULE thirty_minutes no_query_string WHEN is_photo
+
+RULE eight_hours no_query_string WHEN is_rdf
+RULE eight_hours no_query_string WHEN is_rss
+
+RULE eight_hours WHEN is_discussion
+RULE eight_hours WHEN is_viewmessage
+
More information about the MKDoc-commit
mailing list