Beispiel #1
0
        public async Task <ActionResult> NewCoursesAsync()
        {
            var lastUpdateId = await CatalogManager.GetLastSuccessUpdateIdWithNewCoursesAsync();

            var feedString = await CatalogManager.CreateUpdateFeedStringAsync(lastUpdateId, Request.Url, Url);

            Response.Cache.SetExpires(DateTime.UtcNow.AddHours(24.0));
            Response.Cache.SetCacheability(HttpCacheability.Server);
            Response.Cache.AddValidationCallback(CheckCacheItem, lastUpdateId);

            return(Content(feedString, "text/xml;charset=utf-8", Encoding.UTF8));
        }