CategoryModel::buildCache PHP Method

buildCache() protected static method

Build and augment the category cache.
protected static buildCache ( integer $CategoryID = null )
$CategoryID integer The category to
    protected static function buildCache($CategoryID = null)
    {
        self::calculateData(self::$Categories);
        self::joinRecentPosts(self::$Categories, $CategoryID);
        $expiry = self::CACHE_TTL + self::CACHE_GRACE;
        Gdn::cache()->store(self::CACHE_KEY, array('expiry' => time() + $expiry, 'categories' => self::$Categories), array(Gdn_Cache::FEATURE_EXPIRY => $expiry, Gdn_Cache::FEATURE_SHARD => self::$ShardCache));
    }