Hi there, I've been playing with caching using global variables (see http://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 -~----------~----~----~----~------~----~------~--~---