class RespImgPageCache in Responsive images and styles 7
Hierarchy
- class \DrupalDatabaseCache implements DrupalCacheInterface
- class \RespImgPageCache
Expanded class hierarchy of RespImgPageCache
1 string reference to 'RespImgPageCache'
- resp_img_enable in ./
resp_img.module - Implements hook_enable().
File
- ./
cache.inc, line 6
View source
class RespImgPageCache extends DrupalDatabaseCache {
function set($cid, $data, $expire = CACHE_PERMANENT) {
if ($this
->checkCookie()) {
$cid .= '_' . $_COOKIE[RESP_IMG_COOKIE];
}
parent::set($cid, $data, $expire);
}
function getMultiple(&$cids) {
if ($this
->checkCookie()) {
foreach ($cids as $key => $cid) {
$cids[$key] = $cid . '_' . $_COOKIE[RESP_IMG_COOKIE];
}
}
return parent::getMultiple($cids);
}
function clear($cid = NULL, $wildcard = FALSE) {
if ($this
->checkCookie() && !empty($cid) && !$wildcard) {
if (is_array($cid)) {
foreach ($cid as $key => $c) {
$cid[$key] = $c . '_' . $_COOKIE[RESP_IMG_COOKIE];
}
}
else {
$cid .= '_' . $_COOKIE[RESP_IMG_COOKIE];
}
}
parent::clear($cid, $wildcard);
}
function checkCookie() {
return isset($_COOKIE[RESP_IMG_COOKIE]) && is_numeric($_COOKIE[RESP_IMG_COOKIE]);
}
}