+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / pages with extensions other than .aspx

pages with extensions other than .aspx

4 posts, 0 answered
  1. Dan
    Dan avatar
    23 posts
    Registered:
    04 Dec 2010
    30 Dec 2010
    Link to this post
    Hello, I am following the article posted here:
    http://www.sitefinity.com/devnet/kb/sitefinity-3-x/error-when-using-page-extension-different-from-the-default-one.aspx

    However, when I made the required changes, I get this error:
    type or namespace name 'CacheDependencyHandler' does not exist in the namespace 'Telerik.DataAccess' (are you missing an assembly reference?)

    Any ideas?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    31 Dec 2010
    Link to this post
    Hi Dan,

    This KB is for an edition which was released about 3 years ago. You can upgrade your project to the latest official release - Sitefinity 3.7 SP4.

    Currently CacheDependencyHandler is part of Telerik.Caching namespace and Telerik.Framework assembly.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. humayoo
    humayoo avatar
    89 posts
    Registered:
    25 Oct 2010
    21 Jan 2011
    Link to this post
    i am using sitefinity 3.7 sp4 but  . i adding new control. i want to clear cache when adding new control. i used following. Telerik.DataAccess.CacheDependencyHandler.Current.Notify(typeof(Telerik.Cms.ICmsPage));

    but it is saying that  namespace or assembly not define for CacheDependencyHandler


    private void populatePlaceHolder(string templateName,string PlaceHolderId,string msg)
    {
        //clear the cache
         
         
        // create a new instance of CmsManager
        Telerik.Cms.CmsManager MycmsManager = new Telerik.Cms.CmsManager();
        // find the template with name "Child"
        Telerik.Cms.IPageTemplate mytemplate = MycmsManager.GetTemplate(templateName);
        Guid mytemplateId = mytemplate.ID;
        // get template object associated with a transaction in order to modify it
        Telerik.Cms.IPageTemplate mytemplateForEditing = MycmsManager.GetTemplate(mytemplateId, true);
        //clear Cache
        MycmsManager.Provider.ClearPageCache();
        // check out the template for edit
        Telerik.Cms.IStagedPage mystaged = mytemplateForEditing.Staged.CheckOut();
        //create control
        LiteralControl lit=new LiteralControl(msg);
        lit.ID = "lit" + PlaceHolderId;
        // add the control to "MainContent" placeholder
        mystaged.AddControl(PlaceHolderId,lit);
        mytemplateForEditing = MycmsManager.GetTemplate(mytemplateId, true);
        // check in the template
        mytemplateForEditing.GetVersion(mystaged.Version).CheckIn();
        Telerik.DataAccess.CacheDependencyHandler.Current.Notify(typeof(Telerik.Cms.ICmsPage));
         
    }

    please guide me how to solve this problem. i want to clear cache when adding new control programmatically in master template content placeholder.

    thanks
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    25 Jan 2011
    Link to this post
    Hi,

    Basically, when you add a new control or change anything else on the page, you should definitely go through the Publish procedure. Publish on itself, always clears the cache, so this happens behind the scenes, automatically. 

    Do you get something else as a result?

    Regards,
    Georgi
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered