DRUPAL_CACHE_PER_PAGE是否计数寻呼机页面(即首页?page = 3)?


8

我想我的整个问题都在标题中……我想知道使用DRUPAL_CACHE_PER_PAGE的块是否缓存在寻呼机页面上(即mysite.com/frontpage?page=3),或者是否忽略了寻呼机查询(因此该块将仅针对frontpage,frontpage?page = 2,frontpage?page = 3等被缓存一次)?

Answers:


5

是。

参见drupal_page_get_cache()bootstrap.inc:

if (drupal_page_is_cacheable()) {
  $cache = cache_get($base_root . request_uri(), 'cache_page');
  if ($cache !== FALSE) {
    $cache_hit = TRUE;
  }
  return $cache;
}

request_uri() 返回整个路径,包括任何GET参数。


1
kes 因此,如果我有frontpage?page = 1,frontpage?page = 2,frontpage?page = 3 ... frontpage?page = 100,那么该块将在db中单独缓存100次?
Jordan Magnuson 2012年

同样,仍然是。:)
Berdir 2012年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.