/**
  * Check caches
  *
  * @return	@e void
  * @author	MattMecham
  * @access	protected
  */
 protected function checkCaches()
 {
     //-----------------------------------------
     // Check app cache data
     //-----------------------------------------
     $group_cache = self::$handles['caches']->getCache('group_cache');
     if (!is_array($group_cache) or !count($group_cache)) {
         /* Another catch for IPB 1.3 */
         if (IPS_IS_UPGRADER) {
             if (IPSSetUp::is200plus() !== TRUE) {
                 /* Er.. don't actually think we need 'em to be honest */
                 self::DB()->delete('cache_store', 'cs_key=\'group_cache\'');
                 self::DB()->build(array('select' => '*', 'from' => 'groups'));
                 self::DB()->execute();
                 $groups = array();
                 while ($row = self::DB()->fetch()) {
                     $groups[$row['g_id']] = $row;
                 }
                 self::DB()->insert('cache_store', array('cs_key' => 'group_cache', 'cs_value' => serialize($groups)));
             } else {
                 //$this->cache()->rebuildCache( 'group_cache', 'global' );
             }
         }
     }
     $app_cache = self::$handles['caches']->getCache('app_cache');
     //-----------------------------------------
     // Build app data and APP specific load requests
     //-----------------------------------------
     if (is_array($app_cache) and count($app_cache)) {
         foreach ($app_cache as $_app_dir => $_app_data) {
             if (!IPS_IS_TASK and IPS_AREA == 'public' && !$_app_data['app_public_title']) {
                 continue;
             }
             $_app_data['app_public_title'] = $_app_data['app_public_title'] ? $_app_data['app_public_title'] : $_app_data['app_title'];
             self::$applications[$_app_dir] = $_app_data;
         }
     }
     /* Sort by position */
     uasort(self::$applications, 'ipsRegistry::_appPositionSort');
 }
 /**
  * Check caches
  *
  * @return	void
  * @author	MattMecham
  * @access	protected
  */
 protected function checkCaches()
 {
     //-----------------------------------------
     // Check app cache data
     //-----------------------------------------
     $group_cache = self::$handles['caches']->getCache('group_cache');
     if (!is_array($group_cache) or !count($group_cache)) {
         /* Another catch for IPB 1.3 */
         if (IPS_IS_UPGRADER) {
             if (IPSSetUp::is200plus() !== TRUE) {
                 /* Er.. don't actually think we need 'em to be honest */
                 self::DB()->delete('cache_store', 'cs_key=\'group_cache\'');
                 self::DB()->build(array('select' => '*', 'from' => 'groups'));
                 self::DB()->execute();
                 $groups = array();
                 while ($row = self::DB()->fetch()) {
                     $groups[$row['g_id']] = $row;
                 }
                 self::DB()->insert('cache_store', array('cs_key' => 'group_cache', 'cs_value' => serialize($groups)));
             } else {
                 //$this->cache()->rebuildCache( 'group_cache', 'global' );
             }
         }
     }
 }