public List<Content> GetContent(string applicationName_, string path_)
{
Content response = null;
List<Content> contents = null;
object objCache = HttpContext.Current.Cache.Get("Pub.Content");
if (objCache != null)
{
contents = (List<Content>)objCache;
for (int i = 0; i < contents.Count && response == null; i++)
{
Content content = contents[i];
if (content.ApplicationName.ToLower() != applicationName_.ToLower())
continue;
if (content.Path.ToLower() != path_.ToLower())
continue;
response = content;
}
}
if (response == null)
{
response = GetDatabaseContent(applicationName_, path_);
if (response != null)
{
if (contents == null)
contents = new List<Content>();
contents.Add(response);
if (objCache == null)
HttpContext.Current.Cache["Pub.Content"] = contents;
}
}
return response;
}