summaryrefslogtreecommitdiff
path: root/project2/cgi
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2012-02-15 17:26:51 +0000
committerrandomdan <randomdan@localhost>2012-02-15 17:26:51 +0000
commit9dd4bad251cc0155540284bf85969a1796620572 (patch)
tree045f9edc8ccc074eba549192ba1cd6adb9fff843 /project2/cgi
parentPull the script location back into the core and add support for caching of pa... (diff)
downloadproject2-9dd4bad251cc0155540284bf85969a1796620572.tar.bz2
project2-9dd4bad251cc0155540284bf85969a1796620572.tar.xz
project2-9dd4bad251cc0155540284bf85969a1796620572.zip
Improved script component caching, performance tweaks and related fixes for persistent objects
Diffstat (limited to 'project2/cgi')
-rw-r--r--project2/cgi/cgiAppEngine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/project2/cgi/cgiAppEngine.cpp b/project2/cgi/cgiAppEngine.cpp
index 07aa737..d062d87 100644
--- a/project2/cgi/cgiAppEngine.cpp
+++ b/project2/cgi/cgiAppEngine.cpp
@@ -7,6 +7,7 @@
#include <boost/bind.hpp>
#include <boost/foreach.hpp>
#include "ostreamWrapper.h"
+#include "scopeObject.h"
#include <boost/date_time/microsec_time_clock.hpp>
const std::string SESSIONID = "sessionID";
@@ -136,6 +137,7 @@ CgiApplicationEngine::process() const
}
if (TransformSourcePtr ts = currentStage.get<2>()) {
TransformSourcePtr final = finalTransformSource(ts);
+ ScopeObject emptyFinal(boost::bind(&TransformSource::clearTargets, final));
final->addTarget(new CgiResult(header, IO,
rs && rs->root ? rs->root->value("encoding", _env->outputEncoding) : VariableType(_env->outputEncoding)), NULL);
BOOST_FOREACH(const PresenterCachePtr & p, rs->caches) {
@@ -149,6 +151,9 @@ CgiApplicationEngine::process() const
}
}
ts->doTransforms();
+ BOOST_FOREACH(const PresenterCachePtr & p, rs->caches) {
+ p->flushCache();
+ }
if (ddd) {
delete ddd;
}