function views_custom_cache_plugin_cache::cache_expire in Views custom cache 7
Implements views_plugin_cache#cache_expire().
Determine the expiration time of the cache type, or NULL if no expire.
Parameters
string $type: The cache type, either 'query', 'result' or 'output'.
Overrides views_plugin_cache::cache_expire
File
- views/
views_custom_cache_plugin_cache.inc, line 189 - Views custom cache first argument plugin.
Class
- views_custom_cache_plugin_cache
- Views caching given view's first argument.
Code
function cache_expire($type) {
$expiration_time = $this
->get_time();
if ($expiration_time) {
$cutoff = REQUEST_TIME - $expiration_time;
return $cutoff;
}
else {
return NULL;
}
}