Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • stephen 2 posts 22 karma points
    Oct 07, 2013 @ 17:05
    stephen
    0

    Umbraco Caching

    I have a textfield in the Admin for which my user control retrieves the value.

     foreach (umbraco.NodeFactory.Node childNode in node.Children)

                        {

                            umbraco.NodeFactory.Node childEvent = childNode;

                            string childSeats =  childEvent.GetProperty("eventSeatsAvail").Value;

    ...rest of code

     

    }

     

    When I make a change to this value I do not get the updated value, even though it is in the database.

     

    I have checked my IIS settings and they are ok

    I have added

     Response.Cache.SetNoStore();

     

    Response.Cache.SetCacheability(HttpCacheability.NoCache);

    Response.Expires = -1;

     In my Globals Application_BeginRequest

     

     

    I have Republished the site from within the umbraco Admin

    I have viewed in Incognito or Private Browsing through my client browser.

    I have tested againgst various settings in the Macro Cache (ie Cache Period, Cache By Page and Cache Personalized)

     

    Unless I change the Web.Config or a setting in IIS, it continues to retrieve the old value and eventually over a 1 - 1.5 hour period the new value eventually is retrieved.

     

     

    Is there anything that can clear the cache as I cannot have the user having to change/access the web.config file?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Oct 07, 2013 @ 17:29
    Ismail Mayat
    0

    stephen,

    The Node part of api is for presentation only. You need to get Document object so

    foreach (umbraco.NodeFactory.Node childNode in node.Children)
    
                    {
    
                        Document doc  = new Document(childNode.Id);
    
                        //update doc properties then save
    

    }

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft