To explain me better a viewlet approach cab explained like that.
Imagine I can cache a view and inside that I can place code like that:
<cfset event = event.getModelGlue().executeEvent('myEvent') />
do Output here
Once cached my app will benefit form that fact that will just take
html from cache ... and that's it.
A similar solution ( maybe more MG fashion ) can be ability to cache
an event-type:
If I can cahe this:
<event-type name="action.doViewLog" access="private">
<before>
<broadcasts>
<message name="doViewLog"/>
</broadcasts>
<views>
<include name="body"
template="pages/admin/logs/view.cfm" />
</views>
</before>
</event-type>
I can have a similar solution. My app just read html from cache. No
processing up to when cache do not expire.
Hope is clear.
Andrea
On 2 Gen, 18:22, andreacfm <[email protected]> wrote:
> Dan,
>
> I am testing on cf 8.1.
> MG is latest ones just downloaded.
>
> An easy snippet can be :
>
> <!-- home -->
> <event-handler name="page.index" type="layout.site.main">
> <views>
> <include name="body"
> template="pages/index.cfm" cache="true"/>
> </views>
> </event-handler>
>
> If you place a dump now() into index.cfm you will note this is not
> cached.
>
> In this case for example I would like to be able to just cache the
> index view while the rest of the thread ( event-type in this case )
> will be processed at runtime.
>
> What I see is that at the moment I can cache just the main event. This
> is quite limitating in my opinion cause I cannot choose what slice of
> my template
> take from cache and what process.
>
> This also make inpossible a "viewlet" approach ( a view that invoke an
> event and craete an output to be cached ).
>
> What do you think about?
>
> Andrea
>
> On 2 Gen, 17:12, Dan Wilson <[email protected]> wrote:
>
>
>
> > Hey Andrea,
>
> > Thanks for starting the discussion. Would you be able to provide some
> > additional information?
>
> > 1- What version of Model Glue?
> > 2- What version of ColdFusion?
> > 3- A sample of the code that does not work along with a description of what
> > you feel should be happening?
>
> > Dw
>
> > On Sat, Jan 2, 2010 at 11:04 AM, andreacfm <[email protected]> wrote:
> > > HI,
>
> > > looks like the caching on the include declaration is not working.
> > > Does someone can confirm that?
>
> > > Thanks
>
> > > Andrea
>
> > > --
> > > Model-Glue Sites:
> > > Home Page:http://www.model-glue.com
> > > Documentation:http://docs.model-glue.com
> > > Bug Tracker:http://bugs.model-glue.com
> > > Blog:http://www.model-glue.com/blog
>
> > > You received this message because you are subscribed to the Google
> > > Groups "model-glue" group.
> > > To post to this group, send email to [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]<model-glue%2bunsubscr...@googlegrou
> > > ps.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/model-glue?hl=en
>
> > --
> > “Come to the edge, he said. They said: We are afraid. Come to the edge, he
> > said. They came. He pushed them and they flew.”
>
> > Guillaume Apollinaire quotes
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en