https://www.icyphoenix.com/viewtopic.php?f=17&t=9390&p=60032#p60032 ----------------------------------- mort Tue 24 Feb, 2015 11:23 Re: Umm! G Zip ----------------------------------- AFAIK, ob_start() must be immediately after the I did read about it all to the best of my understanding - but the emphasis if I recall was to flush headers? So what with caching, GZip and ob_ start, flush, clean - One is more confused than ever. :censored: I mean in the example below I can't cache the Header or the Footer because they contain stuff that shouldn't be cached. But I cache the guts of it which is the most Database demanding to load all the games and data etc. So what would you change there to make it as small as possible in size? [spoiler][code linenumbers=false] 'cache/gamedata/', 'prefix' => 'gnu_', 'expire' => $set['cachelife'])); $data = $cache->read(''.$template.'.index_body'); if ($data) { echo $data; }else{ $cache->start_caching(); echo ' '.IMG_THL.''.$maxNew.' '.$lang['latest_games'].''.IMG_THR.''.SCRST.'
'; if (!empty($ads_1)) { echo '
'.htmlspecialchars_decode(stripslashes($ads_1)).'
'; } $maxNew = intval($games_per_cat); $stmt = $database->prepare("SELECT ID, name, description, type, views, thumb, thumb_url FROM " . GAMES_TABLE . " WHERE active='1' ORDER BY date_added DESC LIMIT $maxNew"); $stmt->execute(); $result = $stmt->fetchAll(); foreach($result as $row) { $row_id = intval($row['ID']); $row_type = intval($row['type']); $row_views = strip($row['views']); $row_thumb = strip($row['thumb']); $row_thumb_url = strip($row['thumb_url']); $bodydata = htmlEsc($row['description']); $game_name = htmlEsc($row['name']); include "editor/editor_bodydata.php"; if($row_type == 1){ echo ' '; }else{ echo ' '; } if($row_type == 1){ echo ' '.IMG_THUMB_BASE_A1.$row_thumb.IMG_THUMB_BASE_A_IMG.''; }else{ echo ' '.IMG_THUMB_BASE_A2.$row_thumb_url.IMG_THUMB_BASE_A_IMG.''; } echo ' '; } echo '
'.SCRSB.''.IMG_THB.''; // ################ Add Most Played ################### include "most_played.php"; $cache->write(''.$template.'.index_body'); $cache->stop_caching(); echo $cache->read(''.$template.'.index_body'); } include "templates/$template/overall_footer.php"; ?>[/code][/spoiler]