public function getAllEntryRedirects() { /* -- Cache it in our class; no need to fetch it more than once */ if (isset($this->cachedEntryRedirects)) { return $this->cachedEntryRedirects; } $result = craft()->db->createCommand()->select('*')->from('retour_redirects')->order('hitCount DESC')->queryAll(); $this->cachedEntryRedirects = $result; return $result; }