public function flushCache($newMaxCacheSizePerType = NULL)
{
if (!is_null($newMaxCacheSizePerType) && $newMaxCacheSizePerType > 0) {
$this->maxCacheSizePerType = $newMaxCacheSizePerType;
}
$count = count($this->cache, COUNT_RECURSIVE);
$this->cache = array();
return $count;
}