I have the following function, but it is not caching. Is there something I'm missing? Environment: Doctrine Common and DBAL, PHP, MySQL. Should I not have the Cache ID a variable?
function getGeo($latitude, $longitude, $radius, $numResults, $volunteerPid, $startPosition, $pageSize)
{
$cacheDriver = new Doctrine\Common\Cache\ArrayCache();
$geoQuery = $cacheDriver->fetch($volunteerPid);
if ($geoQuery === false) {
$geoQuery = $this->connection->prepare("call sproc_qryGeo($latitude, $longitude, $radius, $numResults, $volunteerPid, $startPosition, $pageSize)");
$cacheDriver->save($volunteerPid, $geoQuery);
echo "NOT CACHED";
}
return $geoQuery;
}