applications/vanilla/models/class.categorymodel.php
public static function SetCache($ID = FALSE, $Data = FALSE) {
      $Categories = Gdn::Cache()->Get(self::CACHE_KEY);
      self::$Categories = NULL;
      
      if (!$Categories)
         return;
      
      if (!$ID || !is_array($Categories)) {
         Gdn::Cache()->Remove(self::CACHE_KEY);
         return;
      }
      
      if (!array_key_exists($ID, $Categories)) {
         Gdn::Cache()->Remove(self::CACHE_KEY);
         return;
      }
      
      $Category = $Categories[$ID];
      $Category = array_merge($Category, $Data);
      $Categories[$ID] = $Category;
      
      self::$Categories = $Categories;
      unset($Categories);
      self::BuildCache();
      self::JoinUserData(self::$Categories, TRUE);
   }
public static function SetCache($ID = FALSE, $Data = FALSE) {
      $Categories = Gdn::Cache()->Get(self::CACHE_KEY);
      self::$Categories = NULL;
      
      if (!$Categories)
         return;
      
      if (!$ID || !is_array($Categories)) {
         Gdn::Cache()->Remove(self::CACHE_KEY);
         return;
      }
      
      if (!array_key_exists($ID, $Categories)) {
         Gdn::Cache()->Remove(self::CACHE_KEY);
         return;
      }
      
      $Category = $Categories[$ID];
      $Category = array_merge($Category, $Data);
      $Categories[$ID] = $Category;
      
      self::$Categories = $Categories;
      unset($Categories);
      self::BuildCache();
      self::JoinUserData(self::$Categories, TRUE);
   }
public static function SetCache ( $ ID = FALSE , $ Data = FALSE ) { $ Categories = Gdn :: Cache ( ) -> Get ( self :: CACHE_KEY ) ; self :: $ Categories = NULL ; if ( ! $ Categories ) return ; if ( ! $ ID || ! is_array ( $ Categories ) ) { Gdn :: Cache ( ) -> Remove ( self :: CACHE_KEY ) ; return ; } if ( ! array_key_exists ( $ ID , $ Categories ) ) { Gdn :: Cache ( ) -> Remove ( self :: CACHE_KEY ) ; return ; } $ Category = $ Categories [ $ ID ] ; $ Category = array_merge ( $ Category , $ Data ) ; $ Categories [ $ ID ] = $ Category ; self :: $ Categories = $ Categories ; unset ( $ Categories ) ; self :: BuildCache ( ) ; self :: JoinUserData ( self :: $ Categories , TRUE ) ; }
Grab and update the category cache

@since 2.0.18
@access public
@param int $ID
@param array $Data
Grab and update the category cache