diff --git a/handlers/handlerpageview.cpp b/handlers/handlerpageview.cpp index c16d224..1588114 100644 --- a/handlers/handlerpageview.cpp +++ b/handlers/handlerpageview.cpp @@ -186,36 +186,8 @@ Response HandlerPageView::handleRequest(PageDao &pageDao, std::string pagename, dynamicVarsMap["createdon"] = utils::toISODate(firstRevision.value().timestamp); std::string resolvedContent = parser.parseDynamics(revision->content, dynamicParseCallback); - if(revisionid > 0) - { - indexcontent = createIndexContent(parser, resolvedContent); - parsedcontent = parser.parse(pageDao, *this->urlProvider, resolvedContent); - } - else - { - std::string cachekeyindexcontent = "page:indexcontent:" + pagename; - std::string cachekeyparsedcontent = "page:parsedcontent:" + pagename; - auto cachedindexcontent = this->cache->get(cachekeyindexcontent); - auto cachedparsedcontent = this->cache->get(cachekeyparsedcontent); - if(cachedindexcontent) - { - indexcontent = *cachedindexcontent; - } - else - { - indexcontent = createIndexContent(parser, resolvedContent); - this->cache->put(cachekeyindexcontent, indexcontent); - } - if(cachedparsedcontent) - { - parsedcontent = *cachedparsedcontent; - } - else - { - parsedcontent = parser.parse(pageDao, *this->urlProvider, resolvedContent); - this->cache->put(cachekeyparsedcontent, parsedcontent); - } - } + indexcontent = createIndexContent(parser, resolvedContent); + parsedcontent = parser.parse(pageDao, *this->urlProvider, resolvedContent); std::string revisionstr = std::to_string(revision->revision); std::string customtitle = parser.extractCommand("pagetitle", revision->content); page.setVar("content", parsedcontent);