Re: objects in memory that don't time out?

2009-06-27 Thread qwcode
> Why not just have a global in your view.py? right, after looking through the wsgi doc provided above, I feel ok with doing that now. I just have to be mindful of different instances of the globals can exist across processes. In other frameworks, e.g. Spring for Java, they provide a singleton

Re: objects in memory that don't time out?

2009-06-26 Thread Robert Mela
Why not just have a global in your view.py? Alternatively, if you need to access the object from multiple views, then implement a singleton in a module, initialize it by importing into settings.py, and then import it into any view that needs it. settings.py works similarly. The values in sett

Re: objects in memory that don't time out?

2009-06-25 Thread qwcode
> If they are non mutable, is thread safety even an issue? I guess I really wanted to just say "If your intention is to use thread-safe globals..." thanks for your help on this. btw, I guess my question could have been asked in terms of whether a singleton pattern is possible... I saw that someo

Re: objects in memory that don't time out?

2009-06-24 Thread Graham Dumpleton
On Jun 25, 3:28 pm, qwcode wrote: > > So, as far as question you pose in different thread, look at Python > > module global variables. If you don't understand how that helps, then > > you don't understand how Python global variables work. Just be aware > > of the issues that global variables ca

Re: objects in memory that don't time out?

2009-06-24 Thread qwcode
> So, as far as question you pose in different thread, look at Python > module global variables. If you don't understand how that helps, then > you don't understand how Python global variables work. Just be aware > of the issues that global variables cause in context of multiprocess > web server

Re: objects in memory that don't time out?

2009-06-24 Thread Graham Dumpleton
On Jun 25, 9:58 am, Graham Dumpleton wrote: > On Jun 25, 9:35 am, qwcode wrote: > > > This is a re-phrase of a previous email... trying to trigger an answer > > using terms that might make more sense to this list.  I'm more > > familiar with java frameworks. > > > Is there a way to have object

Re: objects in memory that don't time out?

2009-06-24 Thread qwcode
let me give an example suppose I want to store an XSLT template object to be reused over and over to transform xml where can I put it? I don't want to put in the backend cache, right? that times out? --~--~-~--~~~---~--~~ You received this message because you ar

Re: objects in memory that don't time out?

2009-06-24 Thread Graham Dumpleton
On Jun 25, 9:35 am, qwcode wrote: > This is a re-phrase of a previous email... trying to trigger an answer > using terms that might make more sense to this list.  I'm more > familiar with java frameworks. > > Is there a way to have objects persist in memory that don't time out? > > For example,

objects in memory that don't time out?

2009-06-24 Thread qwcode
This is a re-phrase of a previous email... trying to trigger an answer using terms that might make more sense to this list. I'm more familiar with java frameworks. Is there a way to have objects persist in memory that don't time out? For example, in cherrypy, there's an Application object that