def get_cached_content(self): """Returns cached """ cache_key = self.get_cache_key() cached_content = cache.get(cache_key) if cached_content is None: cached_content = self._get_part('get_document_body') cached_content = sanitize(cached_content) cache.set(cache_key, cached_content, WALIKI_CACHE_TIMEOUT) return cached_content
def preview(markup, text): content = Page.get_markup_instance(markup).convert( text).get_document_body() content = sanitize(content) return content
def preview(markup, text): content = Page.get_markup_instance(markup).get_document_body(text) content= sanitize(content) return content