just an update on whats happening:
i compared the normal page to a problematic one:
normal: MySQL: 0.0600 s, 250 request(s), PHP: 0.1877 s, total: 0.2477 s, document retrieved from database.
problem: MySQL: 0.0099 s, 31 request(s), PHP: 96.8087 s, total: 96.8186 s, document retrieved from cache.
as you can see i def. have an issue here. 96 seconds to load - thats quite a record. and it says that the page is retrieved from cache. what doesnt it mean ? From the cache of a browser or Modx?
i have friendly urls on and I mostly have ditto and wayfinder calls on my page with 4 custom snippets for banners in this format (same switch cases but different banner codes on the bottom for different sizes):
<?php
$id = $modx->documentIdentifier;
$pid = $modx->getParent($id,1,"id");
while ($pid['id'] != 0) {
$id = $pid['id'];
$pid = $modx->getParent($id,1,"id");
}
switch ($id) {
case "49" : $zoneID = "43"; break; //laced
case "50" : $zoneID = "44"; break; //skin
case "51" : $zoneID = "45"; break; //style
case "52" : $zoneID = "46"; break; //individuals
case "53" : $zoneID = "47"; break; //city guide
case "54" : $zoneID = "48"; break; //entertainment
case "55" : $zoneID = "48"; break; //contests
case "56" : $zoneID = "41"; break; //subscribe
default: $zoneID = "41"; break;
}
echo "
<div class='AD_125'>
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='/openads/www/delivery/ajs.php':'/openads/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write (\"<scr\"+\"ipt type='text/javascript' src='\"+m3_u);
document.write (\"?zoneid=".$zoneID."\");
document.write ('&cb=' + m3_r);
if (document.MAX_used != ',') document.write (\"&exclude=\" + document.MAX_used);
document.write (\"&loc=\" + escape(window.location));
if (document.referrer) document.write (\"&referer=\" + escape(document.referrer));
if (document.context) document.write (\"&context=\" + escape(document.context));
if (document.mmm_fo) document.write (\"&mmm_fo=1\");
document.write (\"'></scr\"+\"ipt>\");
//]]>--></script>
</div>
";
?>