protected function _getLog($rev = null)
{
$class = 'Horde_Vcs_Log_' . $this->_driver;
if (!is_null($rev) && !empty($this->_cache)) {
$cacheId = implode('|', array($class, $this->sourceroot, $this->getPath(), $rev, $this->_cacheVersion));
// Individual revisions can be cached forever
if ($this->_cache->exists($cacheId, 0)) {
$ob = unserialize($this->_cache->get($cacheId, 0));
}
}
if (empty($ob) || !$ob) {
$ob = new $class($rev);
}
$ob->setRepository($this->_rep);
$ob->setFile($this);
if (!is_null($rev) && !empty($this->_cache)) {
$this->_cache->set($cacheId, serialize($ob));
}
return $ob;
}