public static DataSet GetTopLevelCategories(int portalId)
{
string cacheKey = Utility.CacheKeyPublishTopLevelCategories + portalId.ToString(CultureInfo.InvariantCulture);
DataSet ds;
if (ModuleBase.UseCachePortal(portalId))
{
object o = DataCache.GetCache(cacheKey);
if (o != null)
{
ds = (DataSet)o;
}
else
{
ds = DataProvider.Instance().GetTopLevelCategories(portalId);
}
if (ds != null)
{
DataCache.SetCache(cacheKey, ds, DateTime.Now.AddMinutes(ModuleBase.CacheTimePortal(portalId)));
Utility.AddCacheKey(cacheKey, portalId);
}
}
else
{
ds = DataProvider.Instance().GetTopLevelCategories(portalId);
}
return ds;
}