Try Now
More in this section

Forums / General Discussions / Bulk changes to the database

Bulk changes to the database

2 posts, 0 answered
  1. Casey Workman
    Casey Workman avatar
    5 posts
    07 May 2010
    15 Sep 2010
    Link to this post
    We need to make a change to our entire site.  We need to be able to change the settings for "Enable caching" and then have the "Use default settings" and have them both be checked.  Is there a way to accomplish this?  Either through the admin interface, command line or just through a database SQL update query?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    19 Oct 2016
    15 Sep 2010
    Link to this post
    Hello Casey Workman,

    You can use the API. Here is  sample code that illustrates how to enable caching for all pages.

    var manager = new CmsManager();
    var pages = manager.GetPages();
    foreach (ICmsPage p in pages)
        var page = manager.GetPage(p.ID, true) as ICmsPage;
        page.RequireCaching = true;

    This enables default chaching settings.

    Kind 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
2 posts, 0 answered