Hi devs,

I sent my query to the users list a couple of days ago but without  
any success - perhaps one of the devs could answer this question  
about how to store metadata about a cache?

I have a component which retrieves the latest selection of widgets  
from the database, and outputs them nicely as HTML.  Based on the  
widgets retrieved, it also:

- Sets the page meta title to include the name of the first widget
- Sets the page meta description to include the names of all the widgets
- Updates a log table in the database to show which widgets were  
displayed

Retrieving and displaying the widget list is expensive, and there are  
a lot of widget viewers out there so I've set up caching.  I've had  
to workaround setting the title and description through a separate  
sfFileCache which takes longer to expire than the component cache.   
Now I'm looking at caching the widget IDs so that I can record who's  
been looking at them and when.  In future there might be other data  
about the component that I'd also want to cache.

I'm thinking the best way would be to extend sfCacheFilter to also  
store the response meta tags if they've been set, and maybe for my  
component to add the IDs of displayed widgets to a response  
parameter.  Perhaps then a filter could log the display of each  
(potentially including logging for widgets in other components)  
before rendering.

I'd rather not reinvent the wheel though - does anyone have any  
thoughts on what would be the best way to store/retrieve this extra  
information that complements the cached component output?

Kind regards,


James McGlinn
BCom, BSc, Zend Certified Engineer (PHP4, PHP5)
Director
Nerds Inc.

The Loft, 201 Hobson St, Auckland
(09) 377 5663 / (021) 633 234
http://www.nerdsinc.co.nz                               
http://blog.phpdeveloper.co.nz
        
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" 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/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to