Hello.
I am trying to share data in memory between invocations of my request
handler.
I assume that a module gets imported only once per lifetime of the
application and mod_wsgi does not re-import the module for next request.
So basically, I am writing something like this:
class X:
...
XX = X()
def application(environ, start_response):
...
XX.method()
...
and my assumption is that XX and its attributes survive unchanged between
requests.
I have threads=1 and omit "processes" argument, which is equivalent to
processes=1
I found that this is not always true. What I am seeing is that the module
gets re-imported pretty consistently if I access my server from some other
client.
In other words, as long as I access my server from the same browser or
repeat the same wget command from the same computer, I reach the same XX
object. But if I switch to certain other way to access the page, I see that
the module is re-imported and the object is re-created.
Can someone explain this please ?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.