I'm not understanding these suggestions to restart the server. I'm
trying to watch time-varying data in the database back-end by pulling
a monitoring web page. Clearly the ORM knows the backing data has
changed, it issues a fresh query as part of the request/response
cycle. And much of the time, but not all of the time, that new data
actually shows up in the web page. I've done enough restarting and/or
re-installing as part of the dev cycle for this app to not believe
there's something corrupt in $APP/data that just needs deleting.

-- Will

On May 6, 10:09 am, noflashlight <[EMAIL PROTECTED]> wrote:
> I've had this problem in the past, and I solved it by deleting the
> '$APP/data' directory, killing the app and restart it.
>
> On May 6, 12:59 pm, will welch <[EMAIL PROTECTED]> wrote:
>
> > 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