Skip to content

Node.js based forum software built for the modern web

show debug info

barisusakli1364fb94bf66
diff --git a/src/controllers/admin/cache.js b/src/controllers/admin/cache.js
index de27a16775..c0e1c06b65 100644
--- a/src/controllers/admin/cache.js
+++ b/src/controllers/admin/cache.js
@@ -20,14 +20,14 @@ cacheController.get = function(req, res, next) {
itemCount: postCache.itemCount,
percentFull: percentFull,
avgPostSize: avgPostSize,
- dump: req.query.debug ? postCache.dump() : undefined
+ dump: req.query.debug ? JSON.stringify(postCache.dump(), null, 4) : false
},
groupCache: {
length: groupCache.length,
max: groupCache.max,
itemCount: groupCache.itemCount,
percentFull: ((groupCache.length / groupCache.max) * 100).toFixed(2),
- dump: req.query.debug ? groupCache.dump() : undefined
+ dump: req.query.debug ? JSON.stringify(groupCache.dump(), null, 4) : false
}
});
};
diff --git a/src/views/admin/advanced/cache.tpl b/src/views/admin/advanced/cache.tpl
index 68acef6be9..1c7b8ab589 100644
--- a/src/views/admin/advanced/cache.tpl
+++ b/src/views/admin/advanced/cache.tpl
@@ -20,6 +20,10 @@
</div>
</div>
+ <!-- IF postCache.dump -->
+ <pre>{postCache.dump}</pre>
+ <!-- ENDIF postCache.dump -->
+
</div>
</div>
@@ -39,6 +43,10 @@
</div>
</div>
+ <!-- IF groupCache.dump -->
+ <pre>{groupCache.dump}</pre>
+ <!-- ENDIF groupCache.dump -->
+
</div>
</div>
</div>