Exemple #1
0
        public bool TryGetPage(string tcmUri, out IPage page)
        {
            page = null;

            string cacheKey = String.Format("PageByUri_{0}", tcmUri);


            page = (IPage)CacheAgent.Load(cacheKey);
            if (page != null)
            {
                return(true);
            }
            string tempPageContent = PageProvider.GetContentByUri(tcmUri);

            if (tempPageContent != string.Empty)
            {
                page = GetIPageObject(tempPageContent);
                if (IncludeLastPublishedDate)
                {
                    ((Page)page).LastPublishedDate = PageProvider.GetLastPublishedDateByUri(tcmUri);
                }

                CacheAgent.Store(cacheKey, CacheRegion, page);

                return(true);
            }

            return(false);
        }
Exemple #2
0
 public DateTime GetLastPublishedDateByUri(string uri)
 {
     return(PageProvider.GetLastPublishedDateByUri(uri));
 }