You are here

function _cacheflush_clear_preset_clear_table in CacheFlush 7

Same name and namespace in other branches
  1. 7.2 cacheflush.inc \_cacheflush_clear_preset_clear_table()

Function to clear cache from a specific table.

Parameters

string $table: Table name.

array $settings: Preset setting with cache clear functions.

1 call to _cacheflush_clear_preset_clear_table()
_cacheflush_clear_preset in ./cacheflush.inc
Based on settings decide witch clear cache function to be called.

File

./cacheflush.inc, line 52
Cacheflusher module inc file with dinamic clear cache functions.

Code

function _cacheflush_clear_preset_clear_table($table, $settings) {

  // If is advanced preset clear by settings else clear all table.
  if (isset($settings['query'])) {
    cache_clear_all($settings['query']['cid'], $settings['query']['table'], $settings['query']['wildcard'] ? TRUE : FALSE);
  }
  else {
    cache_clear_all('*', $table, TRUE);
  }
}