Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4339076
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:10:05+00:00 2026-05-21T11:10:05+00:00

This doesn’t give desired results, if I add more records in the database they

  • 0

This doesn’t give desired results, if I add more records in the database they appear immediately on the RSS feed.

Sorry, just to be entirely clear, I’m expecting:

  • I run the page
  • I see results
  • I add a record in the DB
  • It doesn’t appear on the feed as it’s loading a cached version
  • It appears later when the cache has expired

At the moment new records appear in the feed immediately.

<%@ WebHandler Language="C#" Class="BlogRSS" %>

using System;
using System.Web;
using System.Web.UI;
using System.Linq;

public class BlogRSS : IHttpHandler {

    public void ProcessRequest (HttpContext context) {

        // Cache this
        OutputCacheParameters CacheSetting = new OutputCacheParameters();
        CacheSetting.Duration = 10;

        // Print out response
        context.Response.ContentType = "text/xml";
        context.Response.Write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
        context.Response.Write("<rss xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:atom=\"http://www.w3.org/2005/Atom\" version=\"2.0\">\n\n");

        context.Response.Write("<channel>\n");
        context.Response.Write("\t<title>Scirra Blog</title>\n");   
        context.Response.Write("\t<link>" + Settings.MasterDomainRoot + "/Blog</link>\n");
        context.Response.Write("\t<description>Construct, Scirra and general game industry news - Scirra.com</description>\n");
        context.Response.Write("\t<language>en-us</language>\n\n");

        context.Response.Write("\t<image>\n");
        context.Response.Write("\t\t<title>Scirra Blog</title>\n");         
        context.Response.Write("\t\t<url>" + Settings.MasterDomainRoot + "/Images/blog-icon-small.png</url>\n");    
        context.Response.Write("\t\t<width>100</width>\n"); 
        context.Response.Write("\t\t<height>91</height>\n");        
        context.Response.Write("\t\t<height>91</height>\n");
        context.Response.Write("\t\t<link>" + Settings.MasterDomainRoot + "/Blog</link>\n");            
        context.Response.Write("\t</image>\n\n");

        context.Response.Write("\t<xhtml:meta xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" />\n\n");

        // Get all blog entries
        using (DataClassesDataContext db = new DataClassesDataContext())
        {
            var q = (from Entry in db.tblBlogEntries orderby Entry.date descending select new { Entry.date, Entry.description, Entry.ID, Entry.title });
            foreach (var Rec in q)
            {
                PrintEntryXML(Rec.ID, Rec.title, Rec.description, Rec.date.Value);
            }
        }

        context.Response.Write("</channel>\n");
        context.Response.Write("</rss>\n");

    }

    /// <summary>
    /// Prints out an item
    /// </summary>
    public static void PrintEntryXML(int EntryID, string Title, string Description, DateTime PublishDate)
    {
        HttpContext.Current.Response.Write("\t<item>\n");

        HttpContext.Current.Response.Write("\t\t<title>" + Title + "</title>\n");
        HttpContext.Current.Response.Write("\t\t<link>" + Settings.MasterDomainRoot + "/Blog/" + EntryID + "/" + SEO.FriendlyURL(Title) + "</link>\n");
        HttpContext.Current.Response.Write("\t\t<description>\n");
        HttpContext.Current.Response.Write("\t\t\t" + Description + "\n");
        HttpContext.Current.Response.Write("\t\t</description>\n");
        HttpContext.Current.Response.Write("\t\t<pubDate>" + CommonFunctions.PubDate(PublishDate) + "</pubDate>\n");

        HttpContext.Current.Response.Write("\t</item>\n\n");
    }

    public bool IsReusable {
        get {
            return false;
        }
    }

}

I’ve tried setting it to a big number as well. I’m not modifying source between requests either.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T11:10:06+00:00Added an answer on May 21, 2026 at 11:10 am

    Are you missing a call to InitOutputCache? I’m not sure how this works in a handler, but I think you would need that if this were a page.

    This question may help:

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
This doesn't work well: image_log = gtk.Image() image_log.set_from_file(test.png) self.out_button = gtk.Button() self.out_button.add(image_log) self.err_button =
This doesn't give the full URL, which breaks as it's in a mailer <%=
This doesn't appear to be possible to me using the standard library json module.
This doesn't appear to be well documented or I missed it, so before I
This doesn't work: int number = 1; String numberstring = IntToString(number); I get The
This doesn't seem to be causing an issue as yet, but it's something I
This doesn't compile, but what I'm trying to do is simply casting object to
This doesn't make sense to me, but I have a feeling I saw a
This doesn't have to be Java, but it's what I'm dealing with. Also, not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.