| 1 |
<?php |
<?php |
| 2 |
// $Id: boost.module,v 1.3.2.2.2.5.2.38 2009/05/30 18:54:38 mikeytown2 Exp $ |
// $Id: boost.module,v 1.3.2.2.2.5.2.39 2009/05/30 20:55:56 mikeytown2 Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 425 |
* TODO: don't cache pages with unacceptable symbols |
* TODO: don't cache pages with unacceptable symbols |
| 426 |
*/ |
*/ |
| 427 |
function boost_is_cacheable($path) { |
function boost_is_cacheable($path) { |
| 428 |
|
$path = (empty($path)) ? variable_get('site_frontpage', 'node') : $path; |
| 429 |
$normal_path = drupal_get_normal_path($path); // normalize path |
$normal_path = drupal_get_normal_path($path); // normalize path |
| 430 |
|
|
| 431 |
// Never cache the basic user login/registration pages or any administration pages |
// Never cache the basic user login/registration pages or any administration pages |
| 433 |
return FALSE; |
return FALSE; |
| 434 |
|
|
| 435 |
// At present, RSS feeds are not cacheable due to content type restrictions |
// At present, RSS feeds are not cacheable due to content type restrictions |
| 436 |
if ($normal_path == 'rss.xml' || preg_match('!/feed$!', $normal_path)) |
if (preg_match('!/feed$!', $normal_path) || preg_match('!\.xml$!', $normal_path)) |
| 437 |
return FALSE; |
return FALSE; |
| 438 |
|
|
| 439 |
// Don't cache comment reply pages |
// Don't cache comment reply pages |