You are here

public static function CacheHelper::get in Helper 7

A copy of cache_get() that respects expiration.

See also

http://drupal.org/node/534092

1 call to CacheHelper::get()
HttpHelper::cachedRequest in lib/HttpHelper.php

File

lib/CacheHelper.php, line 10

Class

CacheHelper

Code

public static function get($cid, $bin = 'cache') {
  if ($cache = cache_get($cid, $bin)) {
    if (!static::isCacheUnexpired($cache)) {
      return FALSE;
    }
  }
  return $cache;
}