I'm been playing around with $m->cache_self() and would like to use it to cache my site's homepage to speed up loading for each new visitor. What I would like to see is my homepage cached after the first initial rendering and then served to each new unique visitor. So I added:
<snip> <%init> return if $m->cache_self; </%init> </snip> to index.html and what I'm seeing in my limited time using it is it creates an object file - /var/site/cache/index.html/e/5/4/e540cdd1328b2b21e29a95405c301b9313b7c322 which seems to be based on the session ID assigned by MasonX::Request::WithApacheSession. Now I assume this cached page will only be used if this same session user hit my homepage, and will create a new cached page for each new user request. This is not what I want. I've tried using the cache_self(key => 'foo') but that doesn't seem to achieve the desired result. There is a form on this page that is pre-filled if the user had already filled it up, but otherwise new visitors should all see the same thing. It also has pre-filled dates, so it would have to be purged and re-cached on midnight of everyday. Is this senario that cache_self is made for? I feel like I'm missing out on using "one of Mason's greatest features";). Justin ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Mason-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mason-users

