GAE is single thread server.
On Dec 2, 2:50 am, Sharp-Developer.Net
[EMAIL PROTECTED] wrote:
Would not be that thread unsafe?
As I understand modules are loaded once per machine instance and then
cached/reused by different requests.
I'm not sure what is the __main__ module. I don't have
Try getting rid of the memcache in favor of a hard-coded value (for testing
purposes only). If you're still getting high CPU usage, then the problem is
not with your use of memcache.
You can also use global variables to cache values, as long as you're
careful.
On Mon, Dec 1, 2008 at 2:28 PM,
Ok, may be the problem was in json serialization/deserialization.
But I'm learning the Python/GAE and still eager to get answer to my
question regarding how to store some values accessible throug out
request without passing them through out all my layers.
Any help?
--
Alex
You can save it to a global variable as cache.
You can use a module level variable as cache and clear it in the
handler's __init__.
On Dec 1, 2:28 pm, Sharp-Developer.Net
[EMAIL PROTECTED] wrote:
Hi,
I have to retrieve some entities by key multiple times during single
request.
I do use
For example,
import __main__
class yourhandler(webapp.RequestHandler):
def __init__():
__main__.cache = {}
On Dec 1, 9:00 pm, yejun [EMAIL PROTECTED] wrote:
You can save it to a global variable as cache.
You can use a module level variable as cache and clear it in the
handler's