Not sure how this thread got hijacked into "MySQL-python installation
nightmare", but I'm setting it back to the subject that is of more
interest to me.

-- Will


On May 8, 8:03 pm, will welch <welch.quietple...@gmail.com> wrote:
> For this afternoon's quick hack, I don't check. Your one-writer-many-
> readers lock in the cache means that any update-the-cache page
> requests that arrive while a new page is being computed have no effect
> (well, they "return" the old cached page immediately, but nobody is
> listening to what these updater requests return). So it's a little
> wasteful in this dogpiling example, but no extra pages are actually
> computed.
>
> On May 8, 6:09 pm, Ben Bangert <b...@groovie.org> wrote:
>
> > On May 8, 2009, at 4:34 PM, will welch wrote:
>
> > > Because I was caching entire pages generated by a controller,
> > > I dodged working out such a creation function (with its own
> > > controller
> > > environment and SA session). Instead I wrote a middleware that
> > > intercepts
> > > a page request, fires up a thread that does a urllib.urlretrieve on
> > > that same
> > > url but with a secret update-the-cache url parameter set, meanwhile
> > > proceeding with forwarding the request along the stack for processing
> > > in the usual way (which will ultimately fetch the currently cached
> > > version
> > > of the requested page with no delay).
>
> > You have some sort of locking in place so that only one thread is  
> > spawned? I mean, if it was to expire, and 30 requests came in at the  
> > same time before it was done, it wouldn't fire up 30 threads would it?
>
> > Cheers,
> > Ben
>
> >  smime.p7s
> > 3KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to