Part of the beauty of twisted is that you don&#39;t actually need to do anything special to achieve that, just create a global dict or other object of your choice and access it as needed.  More likely what you need to look for is a cache expiration mechanism, I&#39;ve linked in lrucache (<a href="http://pypi.python.org/pypi/lrucache/0.2">http://pypi.python.org/pypi/lrucache/0.2</a>) in one case, but usually I just write my own constraints as appropriate.  <br>
<br>It&#39;s often misunderstood, but in twisted you are writing an actual server rather than just some methods for servicing requests.  The server will run until stopped and all global or even local variables will remain in memory unless deleted or dereferenced and garbage collected.  Rather than doing something special to get a persistent variable you need to do something special when you want a non-persistent one.  <br>
<br>-Andy<br><br><div class="gmail_quote">On Mon, Nov 9, 2009 at 2:28 PM,  <span dir="ltr">&lt;<a href="mailto:vitaly@synapticvision.com">vitaly@synapticvision.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Caching the results of some particular method calls, so other server<br>
side methods can access those results (I&#39;m thinking about example of<br>
global variable per entire server, so once imported, such variable<br>
content could be access).<br>
<div><div></div><div class="h5"><br>
<br>
<br>
Quoting <a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>:<br>
<br>
&gt; On 05:41 pm, <a href="mailto:vitaly@synapticvision.com">vitaly@synapticvision.com</a> wrote:<br>
&gt;&gt; hi,<br>
&gt;&gt; is there any cache mechanism for twisted? Could one point me please to<br>
&gt;&gt; that docs?<br>
&gt;<br>
&gt; What sort of caching are you interested in?  Caching the results of<br>
&gt; method calls?  A caching HTTP proxy?  Caching in the DNS client?  The<br>
&gt; total list of possibilities could run to many pages. :)<br>
&gt;<br>
&gt; Jean-Paul<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Twisted-Python mailing list<br>
&gt; <a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
&gt; <a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
&gt;<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Blog:  <a href="http://channel3b.wordpress.com">http://channel3b.wordpress.com</a><br><br>Drinking good coffee makes you wise, drinking bad coffee only makes you awake.<br>