beaker will cache something "forever" if you use a persistent system like file-based caching and don't set any timeout on the cache. It should remain persistent across server restarts.
as far as "per request", I stick things on "c" to accomplish this. On Oct 10, 11:40 am, Wichert Akkerman <[EMAIL PROTECTED]> wrote: > Beaker seems to be very little documentation online, so hopefully > someone can help me out here. > > I am looking at caching the results of things like expensive function > calls and database queries, and beaker seems to be usable as a caching > system. What I can't seem to find is how to conveniently handle > per-request and forever-lasting caching. In Zope I can do this: > > from plone.memoize import forever > from plone.memoize import view > > @forever.memoize > def expensive_stuff(....): > """The result of this function is cached forever, with the function > and its argument as cache keys.""" > > @view.memoize > def expensive_stuff(....): > """The result of this function is cached during this request only, > with the function and its argument as cache keys.""" > > as far as I can see there is no direct alternative for beaker, is that > correct? > > Wichert. > > -- > Wichert Akkerman <[EMAIL PROTECTED]> It is simple to make > things.http://www.wiggy.net/ It is hard to make things > simple. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
