public function useCache($type = self::CACHE_APC) {
    if ($type === self::CACHE_APC) {
      $this->setCache(new \Doctrine\Common\Cache\ApcCache);
    } else {
      $this->setCache(new \Doctrine\Common\Cache\ArrayCache);
    }
  }