In general, the closer you cache to the client the better - if you can
cache html fragments you're probably best off as that lowers the
amount of processing you need to do on the data in cache before
sending it out and is likely to save you some on pickling complex
objects if you can store plain strings.

Cheers,
Damian

On Oct 11, 9:34 pm, Jonathan Vanasco <[email protected]> wrote:
> I cache in the Controllers and in Templates via Lib/Helpers ( aka h.
> functions ).  I never cache in the Model.
>
> In Controllers I mostly cache:
>   a- Pages / Page Fragments
>   b- assembled 'documents' that are just super-stripped down items
> from the model.
>
> In the templates I mostly cache what I would call 'icons'.
>
> What I strive to do is have one cache that only holds assembled
> records of each social object, which has the core data and the ids of
> any releated social objects.
>
> I think use those ids to access/populate an icon cache, which just
> have the bare amount of information needed to display a page.
>
> In practice, it looks like this:
>
> DataObject Cache:
>    key:: Artist:14
>    value:: Large Object with attributes like:
> name=x,bio=y,image=z,related_venues=[],related_artists=[],etc
>
> Icon Cache:
>   key:: Artist 14
>   value= Small Dict like { 'name':'Andy Warhol',
> 'thumbnail':'asdasd.jpg', 'url':'/artists/Andy+Warhol' }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to