/** * Looks in the URL view for a symlink matching the provided * URL and if found, returns the mtime of the link target * * If the link points to /dev/null, we have a URL we were unable * to download before - if that symlink itself is older than 1 hour * we delete it and return 0. If the symlink is younger than hour, * we raise an exception and abort. Intended as mechanism to prevent * repeated attempts to download the same (non 200) URL in a short * time period * * @param String $bucket * @param String $url * @return array(time => int Unix timestamp (0 means not found), revalidate => (true|false), cache_age => int) */ public function getURLLastModified($bucket, $url) { $storage = new binarypool_storage($bucket); $symlink = binarypool_views::getDownloadedViewPath($bucket, $url); return $storage->getURLLastModified($url, $symlink); }