def fetch(self, entry_id): cache_key = str(entry_id) + DATA_CACHE_KEY_SUFFIX last_queried_key = str(entry_id) + LAST_QUERY_CACHE_KEY_SUFFIX blog_entry = memcache.get(cache_key) if not blog_entry: blog_entry = BlogData.get_by_id(entry_id) memcache.set(cache_key, blog_entry) self.setLastQueried(last_queried_key) return blog_entry