I'm having exactly this problem using Elixir/Pylons/Mysql. Repeatedly
reloading a web page, debug-level sqlalchemy output shows the sql
query going out, and the correct (time-varying) data coming back, but
about 1/3 of the time a stale page is ultimately displayed on my
browser instead of the updated value. Have not traced this through the
templater and out the web server yet, would love to hear someone
else's success there.

-- Will


On May 5, 3:37 pm, Nick Jensen <[EMAIL PROTECTED]> wrote:
> Restarting the app should do it.
>
> Sent from my iPhone.
>
> On May 5, 2008, at 6:23 PM, Chris Curvey <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi all, I hope someone can help me.
>
> > I've written a nifty application using Pylons with Genshi and Elixir.
> > But I'm having one crucial problem -- I seem to keep getting stale
> > data returned from my application.  I can sit on a page on my
> > development system, where I know that nobody else is changing the
> > data, and if I hit "refresh" several times, I will see different
> > results.  It looks like it's cycling through the data as it was in
> > various states a few moments ago.
>
> > this is what I have in my lib/base.py controller:
>
> > from trackmgr.model import Session
>
> > class BaseController(WSGIController):
> >    def __call__(self, environ, start_response):
> >        try:
> >            response.headers['Pragma'] = "no-cache"
> >            response.headers['Cache-Control'] = 'no-store;no-
> > cache;must-revalidate;max-age=0'
> >            Session.clear()
>
> >            return WSGIController.__call__(self, environ,
> > start_response)
> >        finally:
> >            Session.remove()
>
> > And I've also told Firefox not to cache anything, so I'm pretty sure
> > that I'm not cacheing on the front end.  (If I was, I would not expect
> > the values to look like they are cycling.)
>
> > Oh, and here's the relevant part of trackmgr.model.__init__:
>
> > import elixir as e
> > Session = scoped_session(sessionmaker(autoflush=True,
> > transactional=True))
> > e.session = Session
> > e.options_defaults.update({
> >    "shortnames" : True
> > })
>
> > Is there something obvious that I'm doing wrong?

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