The names of my cached views look pretty strange:
en_archive_2_url_en_2farchive_2f2.php
en_archive_3_url_en_2farchive_2f3.php
en_archive_url_en_2farchive.php
en_contributors_2_url_en_2fcontributors_2f2.php
en_contributors_url_en_2fcontributors.php
en_masthead_url_en_2fmasthead.php
en_subscriptions_url_en_2fsubscriptions.php
I did some digging around in CacheHelper, then View, and finally ended
up at CakeRequest::_processGet()
if (ini_get('magic_quotes_gpc') === '1') {
$query = stripslashes_deep($_GET);
} else {
$query = $_GET;
}
unset($query['/' . str_replace('.', '_', urldecode($this->url))]);
I don't understand what that last line is for. $_GET looks like this:
array(
'url' => 'en/archive/3'
)
If I add a query string to the request, $query will now look like this:
array(
'url' => 'en/archive/3',
'foo' => 'bar'
)
The 'url' key, of course, is because of ModRewrite's magic. So what's
that unset trying to accomplish? The point of the method is to process
query string args and assign them to $this->query. So shouldn't it be
unset($query['url'])?
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment