문제

Is it possible to let Drupal refresh one particular cached page?

Currently, one page of our site shows some dynamic table data by Table Wizard. After some update in MySQL table, the page does not fresh.

I assume it's due to the site caching is on (Caching mode is set to: Normal). For anonymous users, the page refresh sort of 60 minutes later.

Instead of clearing the whole site's cache, is there a way to let Drupal refresh only one page? Thanks!

도움이 되었습니까?

해결책

One method to "let Drupal refresh one particular" page is to just keep it out of the cache.

The cacheexclude module is designed for this. Just tell it the page(s) you want kept out of cache.

If you don't want to install another module, you can override hook_init():

mymodule_init() {
  $path = drupal_get_path_alias(request_uri());
  if ($path == "<do not cache path>") {
    $GLOBALS['conf']['cache'] = FALSE;
  }
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top