Hi, I built a social blogging system using EE.
It’s on http://zaplog.nl
If features individual weblogs, every user has its own weblog on it’s ‘own’ url. For instance:
http://warp11.zaplog.nl/site
http://p.uncia.zaplog.nl/site
I use code like this in my templates:
<?php
global $HTTP_HOST;
$site = substr($_SERVER[HTTP_HOST], 0, strpos($_SERVER[HTTP_HOST],'.zaplog.nl'));
$host = 'http://'.$_SERVER[HTTP_HOST];
?>I need two things which I can probably modify myself in EE, but I need advice from someone who cvan oversee the modifications.
1. I (think i) need a much higher maximum number of cached pages. The limit now is 1000, can I alter EE to accomodate 2500 or more pages? There is lot’s of room on my server.
2. I need EE to cache complete URL’s. Right now it decides on caching a page using the last part of an URL. So to the caching mechanisme these are the same pages:
http://warp11.zaplog.nl/site/related/afghanistan
http://p.uncia.zaplog.nl/site/related/afghanistan
Because the last part is ‘site/related/afghanistan’ in both cases.
I need EE to cache based on the complete URL’s since in reality the pages above are different pages. Can this be done by a simple PHP-tweak in some core-file? What will be the consequenses?
I changed core.template.php line 2277 to facilitate this. I changed the hash-key calculation to incorporate the complete URL.
From:
$this->cache_hash = md5($site_id.'-'.$template_group.'-'.$template);to
$this->cache_hash = md5($_SERVER[HTTP_HOST].'-'.$site_id.'-'.$template_group.'-'.$template);But I cannot oversee the complete archicture of EE so can Derek or so look at this?