function _blockcache_alter_check_expire in Block Cache Alter 6
Same name and namespace in other branches
- 7 blockcache_alter.module \_blockcache_alter_check_expire()
Helper function to check if this block should be refreshed or not.
Parameters
stdClass $cache A complete cache object.:
int $time The current timestamp.:
Return value
FALSE or TRUE
2 calls to _blockcache_alter_check_expire()
- block_list in patches/
block_with_node_grants.module - Return all blocks in the specified region for the current user.
- block_list in patches/
block_no_node_grants.module - Return all blocks in the specified region for the current user.
File
- ./
blockcache_alter.module, line 305 - Block Cache alter.
Code
function _blockcache_alter_check_expire($cache, $time) {
if ($cache->expire == CACHE_PERMANENT) {
return TRUE;
}
if ($cache->expire > $time) {
return TRUE;
}
return FALSE;
}