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