Yup, I know, that's what brings forth my questions about the large-
scale behavior of in-memory caching. Will the instances be recreated
too often for it to be more effective than memcache? Will there be too
many instances at a time for it to be more effective?

I also rewrote the code to use proper programming conventions, before
someone tells me off for my unconventional code ;) The new code is
here: http://paste.blixt.org/3382

- Andreas Blixt

On Jan 22, 5:08 pm, Tony Arkles <t.ark...@gmail.com> wrote:
> The big difference between in-memory caching and memcache caching is
> that memcache data is shared between all of your running instances,
> but in-memory caching is on a per-instance basis.
>
> On Jan 22, 9:52 am, Blixt <andreasbl...@gmail.com> wrote:
>
>
>
> > Hi there,
>
> > I've been playing with caching using global variables 
> > (seehttp://tack.appspot.com/
> > for my plaything) and would like some input on the following 
> > approach:http://paste.blixt.org/3381
>
> > You would use the above code like this:
>
> > > def get_recent_posts():
> > >     if cache.recent_posts.is_current():
> > >         return cache.recent_posts.data
>
> > >     posts = []
> > >     # ... Populate 'posts' here ...
> > >     cache.recent_posts.set(posts)
>
> > >     return posts
>
> > I'm sure lots of you have experimented with caching in global
> > variables. How often does the running instance shut down (requiring
> > the cache to be rebuilt)? How many instances does it create during
> > heavy load (each instance has separate variables of course, while
> > memcache shares its data across all instances.)
>
> > I've found that using global variables instead of memcache is
> > considerably faster when reloading the same data a few times, but I
> > cannot currently test this on a larger scale, which is why I'm turning
> > to you guys.
>
> > Thanks,
> > Andreas Blixt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to