I probably should have been more specific. I'm talking about the
compiled object data store. Mason also uses Cache::Cache to store output
using:
$m->cache_self;
You can also cache whatever you want simply by getting access to the
Mason cache via $m->cache.
I don't think $m->cache_self will be very useful in Maypole view classes
because all the real work is done in the Maypole model class before the
Mason template is even called. $m->cache might have some minor uses but
I think Maypole::Cache will be eminently more useful.
However, having Mason "cache" compiled templates will be quite useful
and should provide some performance improvements.
I've posted a patch to Maypole::View::Mason on the dev list if you're
interested.
David R. Baird wrote:
>On 29 Sep 2004 at 16:01, Brian Glass wrote:
>
>
>
>>No, I had not seen that. Thanks for pointing that out.
>>
>>If I'm not mistaken this will not automatically update the cache if
>>recent changes (i.e. 5 minutes ago by another user) have been made to
>>the DB. In that case the Mason caching will not be as fast as
>>Maypole::Cache, but will be more acurate since it doesn't cache actual
>>output - but compiled templates. Correct me if I'm wrong.
>>
>>
>
>Part of the Mason API caches actual output of a template (i.e. not
>the compiled version). The rest is just the Cache::Cache API, so you
>can cache db queries etc. Gives you very granular control over what
>to cache. Mason also stores compiled templates in memory and on disk,
>so I guess that's a kind of cache too.
>
>I haven't looked at Maypole::Cache yet so I don't know how they
>compare.
>
>
>d.
>
>
>
>
>>Thanks. I didn't know there was a dev list. It took a google search to
>>find it. It's not mentioned on the Maypole site.
>>
>>
>>Marcus Ramberg wrote:
>>
>>
>>
>>>Did you see Maypole::Cache ? Anyhow, you can submit patches on the dev
>>>list.
>>>
>>>Marcus
>>>
>>>On 29. sep. 2004, at 19.40, Brian Glass wrote:
>>>
>>>
>>>
>>>>In order to help speed things up I've made a simple hack (cludge) to
>>>>Maypole::View::Mason. It allows setting the data_dir parameter so
>>>>that compiled templates are cached to disk. It requires setting a
>>>>global package variable from your Maypole application.
>>>>
>>>>Where or to whom should I post the patch?
>>>>
>>>>It might actually be nice to be able to pass values to the template
>>>>mechanism through the proper channels so globals aren't needed.
>>>>
>>>>_______________________________________________
>>>>maypole mailing list
>>>>maypole at lists.netthink.co.uk
>>>>http://lists.netthink.co.uk/listinfo/maypole
>>>>
>>>>
>>>
>>>
>>>
>>_______________________________________________
>>maypole mailing list
>>maypole at lists.netthink.co.uk
>>http://lists.netthink.co.uk/listinfo/maypole
>>
>>
>
>
>
>_______________________________________________
>maypole mailing list
>maypole at lists.netthink.co.uk
>http://lists.netthink.co.uk/listinfo/maypole
>
>
>
_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT