You are here

function HTMLPurifier_DefinitionCache_Drupal::fetchFromDrupalCache in HTML Purifier 7.2

Same name and namespace in other branches
  1. 5 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::fetchFromDrupalCache()
  2. 6.2 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::fetchFromDrupalCache()
  3. 6 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::fetchFromDrupalCache()
  4. 7 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::fetchFromDrupalCache()
3 calls to HTMLPurifier_DefinitionCache_Drupal::fetchFromDrupalCache()
HTMLPurifier_DefinitionCache_Drupal::add in ./HTMLPurifier_DefinitionCache_Drupal.php
Add an object to the cache without overwriting
HTMLPurifier_DefinitionCache_Drupal::get in ./HTMLPurifier_DefinitionCache_Drupal.php
Retrieve an object from the cache
HTMLPurifier_DefinitionCache_Drupal::replace in ./HTMLPurifier_DefinitionCache_Drupal.php
Replace an object that already exists in the cache.

File

./HTMLPurifier_DefinitionCache_Drupal.php, line 85

Class

HTMLPurifier_DefinitionCache_Drupal

Code

function fetchFromDrupalCache($key) {
  $cached = cache_get("htmlpurifier:{$key}");
  if ($cached) {
    return unserialize($cached->data);
  }
  return FALSE;
}