Andrea,

Sorry, I hope that didn't seem patronizing -- I had recalled that when
briefly testing the caching mechanism a little while ago that I
initially encountered exactly that issue, and then realized that I had
erroneously left the app in development mode before attempting the
test.

It also occurred to me that while I had tested the caching of an event
handler, I had not tried it out on a view. After doing so, I can
confirm that you are quite correct -- setting the cache attribute on
the <include> tag has no effect.

It looks to me like this was not completely implemented in the
framework. While the XmlModuleLoader does add the specified caching
attributes to view objects, the only place where the cacheAdapter is
actually called is in the executeEventQueue() method of EventContext,
and it is only used to retrieve/store the view contained within a
cached event handler -- there are no references to the cacheAdapter
when queuing/rendering the views themselves.

--
Ezra

On Mon, May 25, 2009 at 1:47 AM, andreacfm <[email protected]> wrote:
>
> Ezra, no I am not on development mode.
> reload is set to false.
>
> Andrea
>
> On May 25, 1:05 am, Ezra Parker <[email protected]> wrote:
>> Hi Andrea,
>>
>> Are you in development mode? (The reload setting in your
>> ColdSpring.xml file is set to "true".) If so, then the view will not
>> be cached, as the cacheAdapter will be reloaded, and therefore its
>> instance variables will be re-created when its constructor is called,
>> thus wiping out anything in the cache.
>>
>> HTH,
>>
>> --
>> Ezra Parker
>>
>>
>>
>> On Sun, May 24, 2009 at 1:32 AM, andreacfm <[email protected]> wrote:
>>
>> > Dan waiting your answer and I will be glad to work with you on this.
>>
>> > Andrea
>>
>> > On 22 Mag, 20:07, Dan Wilson <[email protected]> wrote:
>> >> andrea,
>>
>> >> I'm happy you are looking into the cache adapter. I am unfortunately not 
>> >> in
>> >> a place where I can look at this (American Holiday Weekend FTW!). If you
>> >> don't get the answer you need from someone else meanwhile, I'll be back on
>> >> Tuesday and will look at this with you.  I'm interested in working with 
>> >> you
>> >> on the cache.
>>
>> >> Have a nice weekend
>>
>> >> DW
>>
>> >> On Fri, May 22, 2009 at 1:57 PM, andreacfm <[email protected]> wrote:
>>
>> >> > Hi,
>>
>> >> > I am trying modelGlue and arrived to caching module.
>> >> > I like the ease to change teh adapter used but... I cannot get cache
>> >> > working ....
>>
>> >> > I made a simple test:
>>
>> >> > <include name="mainContent" template="pages/events/intro.cfm"
>> >> > cache="true"/>
>>
>> >> > I added cache="true" to a view inclusion I reload and if I dump :
>>
>> >> > <cfdump var="#event.getModelGlue().CACHEADAPTER.getContents()#" />
>>
>> >> > I always get an empty struct that tell me that view has not been
>> >> > cached...
>>
>> >> > Any suggestion??
>>
>> >> > Andrea
>>
>> >> --
>> >> “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
> >
>

--~--~---------~--~----~------------~-------~--~----~
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

For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---

Reply via email to