On Jun 28, 2006, at 12:39 PM, Randall wrote:

>
> That did the trick.  I'll be looking form caching down the road.
> Sometimes it's important to get fresh data from the DB into the form
> and sometimes it's not.  I'll have to study TG's caching  
> mechanisms.  I
> think it would be good to define a form that is cached with widgets
> that are dynamic.  And those dynamic widgets  could even have criteria
> for repopulating.

Generally speaking, you reuse the same form object every time. The  
only reason to do what your original code snippet was doing is if the  
form itself is going to vary from request to request.

Widgets are considered part of the view and don't generally look up  
stuff in the database directly.

At this time, TG itself doesn't include any caching mechanisms. There  
is a caching decorator over at cherrypy.org that people have had some  
success with. The guys at FrozenBear like using Squid.

Kevin



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to