boost module creates static copies of pages in directory 
${document_root}/cache/${host}/0/${request}.html

What I am trying to make Cherokee do is to look for the cached copy 
first; if the cached copy exists serve it as a static file; if the 
cached copy does not exist then give the request to PHP.

You can see in the config below that I also check for the existance of a 
cookie named DRUPAL_UID, but It's only for production use; for testing 
purposes It's enough for me to have the cached copies being served 
statically.

vserver!40!rule!3400!disabled = 1
vserver!40!rule!3400!handler = redir
vserver!40!rule!3400!handler!rewrite!1!regex = ^(.*)$
vserver!40!rule!3400!handler!rewrite!1!show = 0
vserver!40!rule!3400!handler!rewrite!1!substring = 
/cache/lawama.com/0/$1.html
vserver!40!rule!3400!match = and
vserver!40!rule!3400!match!left = not
vserver!40!rule!3400!match!left!right = header
vserver!40!rule!3400!match!left!right!header = Cookie
vserver!40!rule!3400!match!left!right!match = DRUPAL_UID
vserver!40!rule!3400!match!right = exists
vserver!40!rule!3400!match!right!exists = 
cache/lawama.com/0/${request_original}.html
vserver!40!rule!3400!match!right!iocache = 1
vserver!40!rule!3400!match!right!match_any = 0
vserver!40!rule!3400!match!right!match_index_files = 0
vserver!40!rule!3400!match!right!match_only_files = 1
vserver!40!rule!3300!disabled = 1
vserver!40!rule!3300!encoder!deflate = allow
vserver!40!rule!3300!encoder!gzip = allow
vserver!40!rule!3300!handler = file
vserver!40!rule!3300!match = directory
vserver!40!rule!3300!match!directory = /cache

I am not sure about the correctness of 
vserver!40!rule!3400!match!right!exists = 
cache/${host}/0/${request_original}.html
I am not even sure if those variables are available on the file_exists 
rule, but in case they were available I was hoping this config to work.

There's a howto for nginx in http://drupal.org/node/244072 (just for 
reference) but I want to have the boost cache working with nginx.

-- 
Sandino Araico Sánchez
http://sandino.net

_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to