You are here

function messaging_static_cache_set in Messaging 7

Same name and namespace in other branches
  1. 6.4 messaging.module \messaging_static_cache_set()

Set data on static cache, checking whether the cache is under limits.

File

./messaging.module, line 624

Code

function messaging_static_cache_set($cache_name, $key, $value) {
  $cache =& drupal_static($cache_name);
  if ($cache && MESSAGING_CACHE_LIMIT && count($cache) > MESSAGING_CACHE_LIMIT) {
    $cache = array();
  }
  $cache[$key] = $value;
}