You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Erron Austin <er...@gmail.com> on 2007/05/16 04:46:06 UTC

Cache Question

Hi,

I am relatively new to Velocity and I have a couple of questions I hope
someone can help me with.

1) Is there a way for me to determine which items are actually being cached?


2) In the following scenarios, what type of caching could expect?
     a) Using the request Uri, I am parsing the string to pull in the
desired template. For example, /page1/page2 would pull in page1_page2.vm. In
the this page, would be the following code:
      #parse(content/header.vm)
      #parse(content/content.vm)
      #parse(content/footer.vm)

       Would the entire generated page1_page2.vm be cached?

    b) Using the request Uri, I am parsing the string to pull in the desired
template. For example, /page1/page2 would pull in page1.vm. In the this
page, would be the following code:       #parse(content/header.vm)
      #parse(content/$selectedpage)
      #parse(content/footer.vm)

       If the entire site was built in the manner, what kind of
performance/caching could I expect?

Thanks in advance for your help!

Re: Cache Question

Posted by Will Glass-Husain <wg...@gmail.com>.
Caching is not on by default.

But even if it is, it checks for modified pages every 2 seconds, so it would
pick up changes.

Check out the various configuration options in the developer's guide.

WILL

On 5/16/07, sujay <su...@weddingpath.com> wrote:
>
>
> Hi Will,
>
> I presume that caching is not set by default because if I change a
> velocity file on the fly, the changes are automatically picked up?
>
> Thanks
> Sujay
>
>
> On Wed, 16 May 2007 01:31:46 -0700, "Will Glass-Husain" <
> wglasshusain@gmail.com> wrote:
> > Each *.vm file is cached individually.  When the resource loader goes to
> > retrieve a template (whether the master template or one loaded with
> > #parse)
> > it first checks the cache.
> >
> > WILL
> >
> > On 5/15/07, Erron Austin <er...@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> I am relatively new to Velocity and I have a couple of questions I hope
> >> someone can help me with.
> >>
> >> 1) Is there a way for me to determine which items are actually being
> >> cached?
> >>
> >>
> >> 2) In the following scenarios, what type of caching could expect?
> >>      a) Using the request Uri, I am parsing the string to pull in the
> >> desired template. For example, /page1/page2 would pull in
> > page1_page2.vm.
> >> In
> >> the this page, would be the following code:
> >>       #parse(content/header.vm)
> >>       #parse(content/content.vm)
> >>       #parse(content/footer.vm)
> >>
> >>        Would the entire generated page1_page2.vm be cached?
> >>
> >>     b) Using the request Uri, I am parsing the string to pull in the
> >> desired
> >> template. For example, /page1/page2 would pull in page1.vm. In the this
> >> page, would be the following code:       #parse(content/header.vm)
> >>       #parse(content/$selectedpage)
> >>       #parse(content/footer.vm)
> >>
> >>        If the entire site was built in the manner, what kind of
> >> performance/caching could I expect?
> >>
> >> Thanks in advance for your help!
> >>
> >
> >
> >
> > --
> > Forio Business Simulations
> >
> > Will Glass-Husain
> > wglass@forio.com
> > www.forio.com
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

Re: Cache Question

Posted by sujay <su...@weddingpath.com>.
Hi Will,

I presume that caching is not set by default because if I change a velocity file on the fly, the changes are automatically picked up?

Thanks
Sujay


On Wed, 16 May 2007 01:31:46 -0700, "Will Glass-Husain" <wg...@gmail.com> wrote:
> Each *.vm file is cached individually.  When the resource loader goes to
> retrieve a template (whether the master template or one loaded with
> #parse)
> it first checks the cache.
> 
> WILL
> 
> On 5/15/07, Erron Austin <er...@gmail.com> wrote:
>>
>> Hi,
>>
>> I am relatively new to Velocity and I have a couple of questions I hope
>> someone can help me with.
>>
>> 1) Is there a way for me to determine which items are actually being
>> cached?
>>
>>
>> 2) In the following scenarios, what type of caching could expect?
>>      a) Using the request Uri, I am parsing the string to pull in the
>> desired template. For example, /page1/page2 would pull in
> page1_page2.vm.
>> In
>> the this page, would be the following code:
>>       #parse(content/header.vm)
>>       #parse(content/content.vm)
>>       #parse(content/footer.vm)
>>
>>        Would the entire generated page1_page2.vm be cached?
>>
>>     b) Using the request Uri, I am parsing the string to pull in the
>> desired
>> template. For example, /page1/page2 would pull in page1.vm. In the this
>> page, would be the following code:       #parse(content/header.vm)
>>       #parse(content/$selectedpage)
>>       #parse(content/footer.vm)
>>
>>        If the entire site was built in the manner, what kind of
>> performance/caching could I expect?
>>
>> Thanks in advance for your help!
>>
> 
> 
> 
> --
> Forio Business Simulations
> 
> Will Glass-Husain
> wglass@forio.com
> www.forio.com
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: Cache Question

Posted by Will Glass-Husain <wg...@gmail.com>.
Each *.vm file is cached individually.  When the resource loader goes to
retrieve a template (whether the master template or one loaded with #parse)
it first checks the cache.

WILL

On 5/15/07, Erron Austin <er...@gmail.com> wrote:
>
> Hi,
>
> I am relatively new to Velocity and I have a couple of questions I hope
> someone can help me with.
>
> 1) Is there a way for me to determine which items are actually being
> cached?
>
>
> 2) In the following scenarios, what type of caching could expect?
>      a) Using the request Uri, I am parsing the string to pull in the
> desired template. For example, /page1/page2 would pull in page1_page2.vm.
> In
> the this page, would be the following code:
>       #parse(content/header.vm)
>       #parse(content/content.vm)
>       #parse(content/footer.vm)
>
>        Would the entire generated page1_page2.vm be cached?
>
>     b) Using the request Uri, I am parsing the string to pull in the
> desired
> template. For example, /page1/page2 would pull in page1.vm. In the this
> page, would be the following code:       #parse(content/header.vm)
>       #parse(content/$selectedpage)
>       #parse(content/footer.vm)
>
>        If the entire site was built in the manner, what kind of
> performance/caching could I expect?
>
> Thanks in advance for your help!
>



-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com