velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Tesser <jasontes...@gmail.com>
Subject Re: Serialize Template Object
Date Wed, 08 Jul 2009 10:32:19 GMT
Ohh I started to go there and turned back as I wasn't sure that was the best
direction moving forward.  Were you successful?  Is the code open?

I ended up with implementing another cache layer.  We cache at the
ResourceLoader just our velocity code which gets returned to velocity as an
inputstream.  That object is serializable. We also implement a velocity
cache which caches a wrapper of thr Velocity Resource but as a transient
object.

So Basically if the Velocity cache returns null and the object has been
loaded before and not modified at least the loader will return the the
Inputstream without hitting db etc...

Thanks,
Jason Tesser
dotCMS Lead Development Manager
1-305-858-1422


On Wed, Jul 8, 2009 at 4:58 AM, bluejoe <bluejoe2008@gmail.com> wrote:

> I had the same idea some months ago, and asked if there is any exsiting
> method to follow.
> It seems that we have to write extra codes to serialize the ASTNodes:(
>
> -bluejoe
> ----- Original Message -----
> From: "Jason Tesser" <jasontesser@gmail.com>
> To: <user@velocity.apache.org>
> Sent: Monday, June 29, 2009 9:49 PM
> Subject: Serialize Template Object
>
>
> >I have a need for cache purposes to serialize the Velocity Resource
> object.
> > I was hoping to cache the velocity code within the template and then
> > reconstruct the template on the other end.
> >
> > Is there a good way to do this.  I am look at the code and api and it
> isn't
> > obvious how.
> >
> > Thanks,
> > Jason Tesser
> > dotCMS Lead Development Manager
> > 1-305-858-1422
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message