Exemplo n.º 1
0
 public function getCachedTopNew()
 {
     throw new \Exception('not implemented');
     $cache = $this->cache->get('tekstove.lyric.topNew');
     if ($cache) {
         return $cache;
     }
     $newestQuery = new LyricQuery();
     /* @var $newestQuery \Tekstove\TekstoveBundle\Model\LyricQuery */
     $newestQuery->orderById(Criteria::DESC);
     $newestQuery->limit(10);
     $lastLyricsCollection = $newestQuery->find();
     $lastLyrics = $lastLyricsCollection->getArrayCopy();
     $this->cache->set('tekstove.lyric.topNew', $lastLyrics, 60 * 15);
     return $lastLyrics;
 }