Thanks Marzia,

Looks it's exactly on a topic I was looking about.

The only problem - as I understand the samples show how to use a
global variable that cached between requests while I'm interesting in
opposite - how to specify module variable per request.

Anyway thanks again - I'll play withi this and try to get it.
--
Alex
http://sharp-developer.net/

On Sep 15, 7:40 pm, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
> Hi Alex,
>
> If you want a per request counter, you just need a function variable.
>
> What you are seeing is the result of our App Caching with App 
> Engine:http://code.google.com/appengine/docs/python/appcaching.html
>
> -Marzia
>
> On Sat, Sep 13, 2008 at 11:19 AM, Sharp-Developer.Net <
>
> [EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > Sorry for a dummy question from Python newbie.
>
> > I need to limit number of ougoing calls outside of GAE let's say < 5
> > per each request.
>
> > What is best way to implement a counter? I've tryed to place it in a
> > static member of a class but seems the class is live across requests
> > so the counter var is not going to 0 with new request.
>
> > Should I put it to a "request" object or where? I don't want to pass
> > the request through out all my layers.
>
> > So if take .NET would be cool to have something like
> > HttpRequest.Current["MyCounter"] += 1.
>
> > If use Django if it makes any difference.
>
> > Any guidelines or an code sample would be greatly appreciated!
>
> > Have a good day!
> > --
> > Alex
> >http://sharp-developer.net/CV/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to