Hi,

I am currently using TemplateRepresentation to handle the feed creation. 

templateRepr = new 
TemplateRepresentation(this.getVelocityTemplateRepr(),params, 
MediaType.APPLICATION_ATOM_XML);

During debugging realized that the template File (*.vm) is being opened for 
every get request. Is there a way to somehow cache the velocity template ?

One way I could think of is to create a TemplateRepresentation without the 
Map<string,obj> params and populate the updated params in every get request and 
set available flag to true.?

Is there a thread safe way to do the same?

Thanks & Regards,
Sandeep

new TemplateRepresentation(this.getVelocityTemplateRepr(),
, MediaType.APPLICATION_ATOM_XML)

//in every get...
tempRepresentation.setDataModel(..)
tempRepresentation.setAvailable(true)

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2712483

Reply via email to