[AWS] templates_parser.Parse and Cache

Pascal Obry pascal.obry at gmail.com
Fri May 7 16:43:14 CEST 2010


Thomas,

> Am I right in assuming that if
> 
>     Parse (Filename => "content.tmplt", Cache => True)
> 
> then the only thing that is cached, is the structure of the template
> file content.tmplt, not the actual return value from Parse?

Yes, only the template tree structure.

> If so, how do you guys handle caching of content that only change
> rarely or at specific intervals? Is there some magic available in AWS
> or the templates_parser for this?

I see at least three solutions:

1. As Manu said, do nothing the template engine is well optimized

2. Parse and create the file on disk when required and let AWS and
   the Web browser deal with that. Remember that a Web browser has
   a cache and will download only new content.

3. Cache the content on your application for each version of the
   template. That is for each template tags set. Could use an MD5
   of the tag values there as the key and store the content into an
   hash table.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B



More information about the AWS mailing list