[HttpCachingBridgeAbstract] Remove get_cached_time and remove_from_cache

Bridges no longer require to check cache file durations
manually as get_cached now supports the duration parameter
This commit is contained in:
logmanoriginal 2016-09-10 00:09:10 +02:00
parent 1a2a48e129
commit 3a92a1e04b

View file

@ -45,23 +45,7 @@ abstract class HttpCachingBridgeAbstract extends BridgeAbstract {
return str_get_html($content);
}
public function get_cached_time($url){
$filepath = $this->buildCacheFilePath($url);
if(!file_exists($filepath)){
$this->get_cached($url);
}
return filectime($filepath);
}
private function buildCacheFilePath($url){
return __DIR__ . '/../cache/pages/' . sha1($url) . '.cache';
}
public function remove_from_cache($url){
$filepath = $this->buildCacheFilePath($url);
$this->debugMessage('removing from cache \'' . $filepath . '\'');
unlink($filepath);
}
}