function restclient_cache_get in RESTClient 7.2
1 call to restclient_cache_get()
- _restclient_request in ./
restclient.module - Basic request with no body data.
File
- ./
restclient.module, line 1148 - Defines a standard REST interface to RESTful services
Code
function restclient_cache_get($variables, $cid, $stale = FALSE) {
$cache = cache_get($cid, 'cache_restclient');
// If we do want stale records, but stale cache has been disabled, return FALSE.
if ($cache and isset($cache->data->stale_cache) and $stale and !isset($variables['stale_cache'])) {
return FALSE;
}
if (isset($cache->data->stale_cache)) {
$cache->expire = $cache->data->stale_cache;
}
return $cache;
}