Brian,

No problem, you and me both on the vacation front!

The beaker solution you suggested works great, here's the code:

    @beaker_cache(expire=300, type='memory', cache_response=False)
    def _customerOrderHistory(self, customer_id):
        '''This method gets the customer order history for the passed
in
        customer_id. Because of the decorator, the return value is
cached
        by beaker for 5 minutes'''
        return [(o, oi) for o, oi in
self.model.customer.orders(customer_id)]

Nothing exciting there, pretty much exactly as you suggested. I'm
implementing this for some other rather costly SA queries.

Thanks!
Doug


On May 12, 9:57 am, "Brian O'Connor" <[email protected]> wrote:
> Actually I just misread your original question - I didn't realize you were
> caching results of an expensive query.
>
> I need a vacation...
>

-- 
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