oh... cache.ram.storage.clear()
On Dec 2, 3:58 pm, achipa <[EMAIL PROTECTED]> wrote:
> Nice trick ! Although this seems usable only in the vicinity of the
> original select query, it becomes unwieldy if all the selects have to
> be gone through manually... Maybe some sort of cache.invalidate
> (cache.ram, db.table) would help ? Or better yet, a last-modified
> attribute for the table so the select would automatically know if the
> cache is out of sync (not perfect as it cannot know if you modified
> the table outside of the stock web2py methods, but hey, still way
> better than nothing) ?
>
> On Dec 2, 7:32 pm, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > If you are using cache.ram
>
> > cache.ram(db._uri+'/'+db(....)._select(....),None,0)
>
> > Will invalidate the result of db(....).select(....) without executing
> > the select.
>
> > notice the _select(...) instead of select(...). Does not work on GAE.
>
> > Massimo
>
> > On Dec 2, 12:15 pm, achipa <[EMAIL PROTECTED]> wrote:
>
> > > Is it possible to invalidate a select cache ? For example if I know
> > > that I'm about to update a table I would like to invalidate the cache
> > > that pertains to that table so that other controller functions can
> > > update the cache and not work with stale data.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---