Monday 14 November 2016

Sitecore Tips: To Save time disable Sitecore cache and browser cache during development

Sitecore: To Save time disable Sitecore cache and browser cache during development


Cache is required for better performance of application.

During development stage, it is always suggested to disable Sitecore cache and also browser cache to avoid wasting time in recycling application pool or clearing cache from cache admin. To disable it, 

      <!--  CACHING ENABLED
            Determines if caching should be enabled at all
            Specify 'true' to enable caching and 'false' to disable all caching
      -->
      <setting name="Caching.Enabled" value="true" />
      <!--  DISABLE BROWSER CACHING
            If true, all pages will have:
              Cache-Control: no-cache, no-store
              Pragma: no-cache
            in the http header
      -->
      <setting name="DisableBrowserCaching" value="true" />

Both the setting should be true; former to avoid Sitecore cache and latter to BrowserCache.

Tuesday 1 November 2016

Improving performance of Application startup in Sitecore 8+

Improving performance of Application startup in Sitecore 8+

Disable the precompilation of SPEAK components: 
  • Comment out this part of the
  • Website\App_Config\Include\Sitecore.Speak.config file:
  • <initialize>
    <processor type="Sitecore.Pipelines.Initialize.PrecompileSpeakViews, Sitecore.Speak.Client">
    <Paths>/sitecore/shell/client/Business Component Library</Paths>
    </processor>
    </initialize>
  • Comment out this part of the 
  • Website\App_Config\Include\ContentTesting\ Sitecore.ContentTesting.config file: <processor type="Sitecore.Pipelines.Initialize.PrecompileSpeakViews, Sitecore.Speak.Client" use="ContentTesting">
  • <Paths>/sitecore/shell/client/Applications/ContentTesting</Paths>
    </processor>

Publish Queue, History and Event Queue too big

Publish Queue, History and Event Queue too big

Existing CMS users are unable to publish content on Sitecore.
Syntax:

/* TRUNCATE History TABLE */
IF OBJECT_ID('History', 'U') IS NOT NULL
IF((SELECT COUNT(*) FROM [History]) > 1000)
BEGIN
TRUNCATE TABLE [History];
PRINT 'Truncated the History Table';
END
/* TRUNCATE EventQueue TABLE */
IF OBJECT_ID('EventQueue', 'U') IS NOT NULL
if((SELECT COUNT(*) FROM [EventQueue]) > 1000)
BEGIN
TRUNCATE TABLE [EventQueue];
PRINT 'Truncated the EventQueue Table';
END
/* TRUNCATE PublishQueue TABLE */
IF OBJECT_ID('PublishQueue', 'U') IS NOT NULL
IF((SELECT COUNT(*) FROM [PublishQueue]) > 1000)
BEGIN
TRUNCATE TABLE [PublishQueue];
PRINT 'Truncated the PublishQueue Table';
END

Enable / Disable application access to users.

Enable / Disable application access to users.
If you do not want editors to be able to access the Page Editor at all, you can restrict access to the Page Editor buttons in the core database as you would with any other item. By default, there are Page Editor buttons in the following locations:
/sitecore/content/Documents and settings/All users/Start menu/Right/Page Editor
/sitecore/content/Applications/Content Editor/Ribbons/Chunks/Publish/Page Editor
If Read access is denied on these items, they do not appear in the ribbon or Desktop menu.