You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Edd Grant <ed...@eddgrant.com> on 2010/11/27 11:09:02 UTC
Disable template caching?
Hi All,
I have been doing a spot of work on my custom theme and was wondering if
there is there a way to switch off template caching while developing theme
templates to speed up development?
Currently I'm doing the following:
1: Modify template
2: /etc/init.d/tomcat6 restart
3: Reload page and check change
4: Repeat ad nauseum
As you can probably imaging this technique is incredibly clunky - most
grateful if anyone knows of a more expedient way to force my template
changes to be read.
Cheers,
Edd
--
Mobile: +44 (0) 7861 394 543
Web: http://www.eddgrant.com
Re: Disable template caching?
Posted by Jorge Martinez <jm...@gmail.com>.
Hi Edd,
There is a velocity engine property named 'velocimacro.library.autoreload'.
If set to 'true', you can change velocimacros 'on-the-fly' without
restarting servlet container. It worked for me, but if not, try to use it in
conjuntion with file.resource.loader.cache = false
Take a look to this:
http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html
Hope this helps
Jorge
2010/11/27 Edd Grant <ed...@eddgrant.com>
> Hi All,
>
> I have been doing a spot of work on my custom theme and was wondering if
> there is there a way to switch off template caching while developing theme
> templates to speed up development?
>
> Currently I'm doing the following:
>
> 1: Modify template
> 2: /etc/init.d/tomcat6 restart
> 3: Reload page and check change
> 4: Repeat ad nauseum
>
> As you can probably imaging this technique is incredibly clunky - most
> grateful if anyone knows of a more expedient way to force my template
> changes to be read.
>
> Cheers,
>
> Edd
>
> --
> Mobile: +44 (0) 7861 394 543
> Web: http://www.eddgrant.com
>
--
Jorge Martinez
630934694
Re: Disable template caching?
Posted by Daniel Ruan <da...@gmail.com>.
Hi Edd,
Have you figured out how to disable the Velocity template caching? I am
having the same problem. Tried velocimacro.library.autoreload=true and
file.resource.loader.cache = false, but didn't work.
I think Roller uses its own class to load the templates:
theme.resource.loader.class=org.apache.roller.weblogger.ui.rendering.velocity.ThemeResourceLoader
Thanks,
Daniel
On Mon, Nov 29, 2010 at 6:47 AM, <ed...@eddgrant.com> wrote:
> Hi Manos,
>
> Thanks - I did actually check the documentation prior to posting my
> question, as far as I could see all the caching properties referenced seemed
> to relate more to the caching of feed items rather than Velocity templates.
> Did you have a specific property in mind here?
>
> As it happens Jorge has provided me with the instructions on how to
> configure the Velocity engine directly so I'm going to take a look at the
> codebase and see if I can pass these properties through to Velocity from the
> roller-custom.properties file.
>
> Cheers,
>
> Edd
>
>
> On Mon, 29 Nov 2010 13:24:23 +0200, "Emmanouil Batsis (Manos)" <
> manos@abiss.gr> wrote:
>
>> On 11/27/2010 12:09 PM, Edd Grant wrote:
>>
>>> As you can probably imaging this technique is incredibly clunky - most
>>> grateful if anyone knows of a more expedient way to force my template
>>> changes to be read.
>>>
>>
>> Check the documentation, there are properties to enable/disable
>> caching in roller-custom.properties and maybe in
>> planet-custom.properties and velocity.properties.
>>
>>
>> --
>> Manos Batsis, Chief Technologist
>> __ _
>> ____ _/ /_ (_)_________ ____ ______
>> / __ `/ __ \/ / ___/ ___// __ `/ ___/
>> / /_/ / /_/ / (__ |__ )/ /_/ / /
>> \__,_/_.___/_/____/____(_)__, /_/
>> /____/
>> http://www.Abiss.gr
>>
>> 19, Kalvou Street,
>> 14231, Nea Ionia,
>> Athens, Greece
>> Tel: +30 211-1027-900
>> Fax: +30 211-1027-999
>>
>> http://calipso.abiss.gr
>> http://gr.linkedin.com/in/manosbatsis
>>
>
>
Re: Disable template caching?
Posted by "Emmanouil Batsis (Manos)" <ma...@abiss.gr>.
On 11/29/2010 01:47 PM, edd@eddgrant.com wrote:
> Thanks - I did actually check the documentation prior to posting my
> question, as far as I could see all the caching properties referenced
> seemed to relate more to the caching of feed items rather than Velocity
> templates. Did you have a specific property in mind here?
I just remembered I used the docos to disable caching a long time ago,
thats why i pointed out to those - couldn't remember the property names ;-)
--
Manos Batsis, Chief Technologist
__ _
____ _/ /_ (_)_________ ____ ______
/ __ `/ __ \/ / ___/ ___// __ `/ ___/
/ /_/ / /_/ / (__ |__ )/ /_/ / /
\__,_/_.___/_/____/____(_)__, /_/
/____/
http://www.Abiss.gr
19, Kalvou Street,
14231, Nea Ionia,
Athens, Greece
Tel: +30 211-1027-900
Fax: +30 211-1027-999
http://calipso.abiss.gr
http://gr.linkedin.com/in/manosbatsis
Re: Disable template caching?
Posted by ed...@eddgrant.com.
Hi Manos,
Thanks - I did actually check the documentation prior to posting my
question, as far as I could see all the caching properties referenced
seemed to relate more to the caching of feed items rather than Velocity
templates. Did you have a specific property in mind here?
As it happens Jorge has provided me with the instructions on how to
configure the Velocity engine directly so I'm going to take a look at
the codebase and see if I can pass these properties through to Velocity
from the roller-custom.properties file.
Cheers,
Edd
On Mon, 29 Nov 2010 13:24:23 +0200, "Emmanouil Batsis (Manos)"
<ma...@abiss.gr> wrote:
> On 11/27/2010 12:09 PM, Edd Grant wrote:
>> As you can probably imaging this technique is incredibly clunky -
>> most
>> grateful if anyone knows of a more expedient way to force my
>> template
>> changes to be read.
>
> Check the documentation, there are properties to enable/disable
> caching in roller-custom.properties and maybe in
> planet-custom.properties and velocity.properties.
>
>
> --
> Manos Batsis, Chief Technologist
> __ _
> ____ _/ /_ (_)_________ ____ ______
> / __ `/ __ \/ / ___/ ___// __ `/ ___/
> / /_/ / /_/ / (__ |__ )/ /_/ / /
> \__,_/_.___/_/____/____(_)__, /_/
> /____/
> http://www.Abiss.gr
>
> 19, Kalvou Street,
> 14231, Nea Ionia,
> Athens, Greece
> Tel: +30 211-1027-900
> Fax: +30 211-1027-999
>
> http://calipso.abiss.gr
> http://gr.linkedin.com/in/manosbatsis
Re: Disable template caching?
Posted by "Emmanouil Batsis (Manos)" <ma...@abiss.gr>.
On 11/27/2010 12:09 PM, Edd Grant wrote:
> As you can probably imaging this technique is incredibly clunky - most
> grateful if anyone knows of a more expedient way to force my template
> changes to be read.
Check the documentation, there are properties to enable/disable caching
in roller-custom.properties and maybe in planet-custom.properties and
velocity.properties.
--
Manos Batsis, Chief Technologist
__ _
____ _/ /_ (_)_________ ____ ______
/ __ `/ __ \/ / ___/ ___// __ `/ ___/
/ /_/ / /_/ / (__ |__ )/ /_/ / /
\__,_/_.___/_/____/____(_)__, /_/
/____/
http://www.Abiss.gr
19, Kalvou Street,
14231, Nea Ionia,
Athens, Greece
Tel: +30 211-1027-900
Fax: +30 211-1027-999
http://calipso.abiss.gr
http://gr.linkedin.com/in/manosbatsis