Re: Keeping data in memory

Graham Dumpleton <[email protected]> Wed, 10 Feb 2010 11:12:21 +1100
Newsgroups gmane.comp.python.mod_python
Message-ID <[email protected]>
True. As described in:

  http://www.dscpl.com.au/wiki/ModPython/Articles/TheProcessInterpreterModel

if you want cross process sharing, you can't rely on global variables
and must use an out of process storage mechanism.

Graham

2010/2/9 Primožič Boštjan <[email protected]>:
> It works with global variables, but if there is more than one thred/instance
> of interpreter there will be problems.
>
>> Hi,
>>
>> I'd like to know if it's possible and how to store some data in memory.
>> I get small amount of date by parsing some other pages and this takes
>> relativly long time, so I want to keep this data in memory ( if posible ).
>> I
>> heared something about storing this data in "global" variable which stays
>> in
>> memory all the time.
>
> Have you actually tried using Google to search for 'Python global
> variables'.
>
> http://www.google.com/search?client=safari&rls=en&q=python+global+variables&ie=UTF-8&oe=UTF-8
>
> Understand what global variables are in Python and you have your answer.
>
> Graham
>