def user_cache(update = False): key = 'users' users = memcache.get(key) if users is None or update: users = User.query().order(-User.created, User.name).fetch(10) users = list(users) memcache.set(key, users) return users