/**
* Get the last build timestamp for a given build.
*
* Will either read the cached version, or the on disk version. If
* no timestamp is found for a file, a new time will be generated and saved.
*
* If timestamps are disabled, false will be returned.
*
* @param AssetTarget $build The build to get a timestamp for.
* @return mixed The last build time, or false.
*/
public function getTimestamp(AssetTarget $build)
{
$ext = $build->ext();
if (empty($this->timestamp[$ext])) {
return false;
}
$data = $this->_readTimestamp();
$name = $this->buildCacheName($build);
if (!empty($data[$name])) {
return $data[$name];
}
$time = time();
$this->setTimestamp($build, $time);
return $time;
}