Cache hash not unique with subdomains - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Cache hash not unique with subdomains (/showthread.php?tid=20294) |
Cache hash not unique with subdomains - El Forum - 07-04-2009 [eluser]a tired machine[/eluser] Hello, Our site uses the following scheme for searches: category1.oursite.com/Location category2.oursite.com/Location which using htaccess map to: /find/results/category1/Location /find/results/category2/Location Unfortunately, it appears that the above two get the same cache md5 hash, since the hash uses base_url (which for us is always http://www.oursite.com) to determine the domain of the page being loaded. This really limits the routability and use of subdomains with CodeIgniter. I did a quick hack to our output library and changed to: $uri = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; But having hacked core files is obviously not ideal. Cache hash not unique with subdomains - El Forum - 07-20-2009 [eluser]a tired machine[/eluser] actually, using http_host is obviously not ideal since it relies on http headers, but -- creating the cache hash based on the resegmented codeigniter URI is better than how it currently is in codeigniter. |