aboutsummaryrefslogtreecommitdiff
path: root/simplecache
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-03 13:19:13 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-03 13:19:13 +0000
commit51140af8ceb4ae08847a7ef4800bbd022f542513 (patch)
tree51bcdf46b2b02e6af082f541e55d1218a1c0bf2f /simplecache
parent00ce17904b7e7a2708eff759858b9d57fef47e62 (diff)
downloadelgg-51140af8ceb4ae08847a7ef4800bbd022f542513.tar.gz
elgg-51140af8ceb4ae08847a7ef4800bbd022f542513.tar.bz2
Content length on the simplecache.
git-svn-id: https://code.elgg.org/elgg/trunk@3035 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'simplecache')
-rw-r--r--simplecache/view.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/simplecache/view.php b/simplecache/view.php
index 826288c29..99f40c141 100644
--- a/simplecache/view.php
+++ b/simplecache/view.php
@@ -47,16 +47,17 @@
if ($simplecache_enabled || $override) {
$filename = $dataroot . 'views_simplecache/' . md5($viewtype . $view);
- if (file_exists($filename))
- $contents = @file_get_contents($filename);
- else {
+ if (file_exists($filename)) {
+ $contents = file_get_contents($filename);
+ header("Content-Length: " . strlen($contents));
+ } else {
echo ''; exit;
}
} else {
mysql_close($mysql_dblink);
require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
$contents = elgg_view($view);
- //header("Content-Length: " . strlen($contents));
+ header("Content-Length: " . strlen($contents));
}
}
}