function hacked_project_hashes_are_cached in Hacked! 6
Same name and namespace in other branches
- 5 hacked.module \hacked_project_hashes_are_cached()
1 call to hacked_project_hashes_are_cached()
File
- ./
hacked.module, line 400 - The Hacked! module, shows which project have been changed since download.
Code
function hacked_project_hashes_are_cached($type, $short_name, $version) {
static $cached = array();
// Return from the static cache if we can:
if (!isset($cached[$type][$short_name][$version])) {
// Return form the cache system if we can:
$key = "hacked:clean:hashes:{$type}:{$short_name}:{$version}";
$cache = cache_get($key, HACKED_CACHE_TABLE);
if ($cache && isset($cache->data)) {
$cached[$type][$short_name][$version] = TRUE;
}
else {
$cached[$type][$short_name][$version] = FALSE;
}
}
return $cached[$type][$short_name][$version];
}