K2 Runtime web.config File Caching Settings

The following Cache settings are available in the K2 Runtime web.config file typically found at: C:\Program Files\K2\K2 smartforms Runtime\Web.config. This topic does not list all possible cache settings found in the Runtime web.config file. The settings below apply to all cache items.

Web Caching Settings

The following affect caching of the K2 runtime site. Number values are generally in seconds. Caching settings apply the following pattern but all patterns do not necessarily apply to all items.

Node Change permitted? Description Example or Default Value

<!-- <add key="Forms.Caching.Peers" value="/Runtime/;/Designer/"/> -->

Yes Used to distribute cache updates between different runtime and design time sites. To disable cache updates use a blank value. If not specified all the runtime URL's sites registered in the environment library are used. In NLB and Cluster environments, this can be set to the individual nodes of the Cluster/NLB Relative or absolute URL on the root of the website

<add key="Forms.Runtime.BaseUrl.Cache.Enabled" value="true" />

<add key="Forms.Runtime.BaseUrl.Cache.InitialDuration" value="3600" />

<add key="Forms.Runtime.BaseUrl.Cache.SlidingDuration" value="0" />

<add key="Forms.Runtime.BaseUrl.Cache.Priority" value="Normal" />

<add key="Forms.Runtime.BaseUrl.Cache.Cacheability" value="Server" />

Yes Runtime Settings for the K2 Designer See Web Cache Settings

<add key="Forms.UserVersions.Cache.Enabled" value="true" />

<add key="Forms.UserVersions.Cache.InitialDuration" value="30" />

<add key="Forms.UserVersions.Cache.SlidingDuration" value="0" />

<add key="Forms.UserVersions.Cache.Priority" value="High" />

<add key="Forms.UserVersions.Cache.Cacheability" value="Server" />

Yes Settings for timestamps per user if anything is changed See Web Cache Settings

<add key="Forms.Runtime.PersistedParameters.Cache.Enabled" value="true" />

<add key="Forms.Runtime.PersistedParameters.Cache.InitialDuration" value="3600" />

<add key="Forms.Runtime.PersistedParameters.Cache.SlidingDuration" value="0" />

<add key="Forms.Runtime.PersistedParameters.Cache.Priority" value="BelowNormal" />

<add key="Forms.Runtime.PersistedParameters.Cache.Cacheability" value="Server" />

Yes Runtime setting to persist information per Form. Used when a SmartObject Method is executed and a Method Parameter is required. See Web Cache Settings

<add key="Forms.Runtime.PersistedFilters.Cache.Enabled" value="true" />

<add key="Forms.Runtime.PersistedFilters.Cache.InitialDuration" value="3600" />

<add key="Forms.Runtime.PersistedFilters.Cache.SlidingDuration" value="0" />

<add key="Forms.Runtime.PersistedFilters.Cache.Priority" value="BelowNormal" />

<add key="Forms.Runtime.PersistedFilters.Cache.Cacheability" value="Server" />

Yes Runtime setting to persist information per Form. Used when a List View is executed and filters have been specified. Caching is applied per user per View. See Web Cache Settings

<add key="Forms.Runtime.CultureDetails.Cache.Enabled" value="true" />

<add key="Forms.Runtime.CultureDetails.Cache.InitialDuration" value="25920000" />

<add key="Forms.Runtime.CultureDetails.Cache.SlidingDuration" value="0" />

<add key="Forms.Runtime.CultureDetails.Cache.Priority" value="High" />

<add key="Forms.Runtime.CultureDetails.Cache.Cacheability" value="Public" />

Yes Culture settings for a View or Form for example Date/Time format and Currency format See Web Cache Settings

<add key="Forms.Runtime.Controllers.Cache.Enabled" value="true" />

<add key="Forms.Runtime.Controllers.Cache.InitialDuration" value="25920000" />

<add key="Forms.Runtime.Controllers.Cache.SlidingDuration" value="0" />

<add key="Forms.Runtime.Controllers.Cache.Priority" value="High" />

<add key="Forms.Runtime.Controllers.Cache.Cacheability" value="ServerAndPrivate" />

Yes Controllers settings for a View or Form See Web Cache Settings

<add key="Forms.Runtime.Events.Cache.Enabled" value="true" />

<add key="Forms.Runtime.Events.Cache.InitialDuration" value="25920000" />

<add key="Forms.Runtime.Events.Cache.SlidingDuration" value="0" />

<add key="Forms.Runtime.Events.Cache.Priority" value="High" />

<add key="Forms.Runtime.Events.Cache.Cacheability" value="ServerAndPrivate" />

Yes Events settings for a View or Form See Web Cache Settings

<add key="Forms.Runtime.EnvironmentFields.Cache.Enabled" value="true" />

Yes Environment fields setting. When set to "true" caching of environment fields is enabled See Web Cache Settings

<add key="Forms.Runtime.EnvironmentFields.Cache.InitialDuration" value="300"/>

Yes Environment fields setting. This is the duration (in seconds) the environment fields will be cached. The default is 300 seconds See Web Cache Settings

<add key="Forms.Web.Settings.Cache.Enabled" value="true" />

<add key="Forms.Web.Settings.Cache.InitialDuration" value="86400" />

<add key="Forms.Web.Settings.Cache.SlidingDuration" value="0" />

<add key="Forms.Web.Settings.Cache.Priority" value="Normal" />

<add key="Forms.Web.Settings.Cache.Cacheability" value="Server" />

Yes Caching of View or Form settings See Web Cache Settings

<add key="Forms.JsonResources.Cache.Enabled" value="true" />

<add key="Forms.JsonResources.Cache.InitialDuration" value="25920000" />

<add key="Forms.JsonResources.Cache.SlidingDuration" value="0" />

<add key="Forms.JsonResources.Cache.Priority" value="High" />

<add key="Forms.JsonResources.Cache.Cacheability" value="Public" />

Yes Controls caching of localized resources for Forms containing for example error messages etc See Web Cache Settings

<add key="Forms.CombinedResources.Cache.Enabled" value="true" />

<add key="Forms.CombinedResources.Cache.InitialDuration" value="25920000" />

<add key="Forms.CombinedResources.Cache.SlidingDuration" value="0" />

<add key="Forms.CombinedResources.Cache.Priority" value="High" />

<add key="Forms.CombinedResources.Cache.Cacheability" value="Public" />

Yes Caching of Post Render Combining. Combined resource of CSS and script files after Form has been rendered, delivered as one file to the browser See Web Cache Settings

<add key="SmartObjects.Client.SmartObject.Cache.Enabled" value="true" />

<add key="SmartObjects.Client.SmartObject.Cache.InitialDuration" value="3600" />

<add key="SmartObjects.Client.SmartObject.Cache.SlidingDuration" value="0" />

<add key="SmartObjects.Client.SmartObject.Cache.Priority" value="High" />

Yes Caching of the Runtime definition of the SmartObject. See Web Cache Settings

<add key="SmartObjects.Client.SmartObjectServerVersion.Cache.Enabled" value="true" />

<add key="SmartObjects.Client.SmartObjectServerVersion.Cache.InitialDuration" value="60" />

<add key="SmartObjects.Client.SmartObjectServerVersion.Cache.SlidingDuration" value="0" />

<add key="SmartObjects.Client.SmartObjectServerVersion.Cache.Priority" value="High" />

Yes Settings to get the latest version of the SmartObject definition from the server. See Web Cache Settings

Management and Client API Tracing and Caching

The default cache settings are there to give the best performance. If you change any of these settings, thoroughly test them to be sure there is not a negative impact on performance.

If you reinstall or reconfigure K2, any customized cache settings are overwritten by the default settings.

The following affect caching of the K2 runtime site. Number values are generally in seconds. Caching settings apply the following pattern but all patterns do not necessarily apply to all items.

Node Change permitted? Description Example or Default Value

<add key="Forms.Management.TraceEnabled" value="false" />

<add key="Forms.Management.Cache.TraceEnabled" value="false" />

<add key="Forms.Management.ControlTypes.Enabled" value="true" />

<add key="Forms.Management.ControlTypes.InitialDuration" value="3600" />

Yes

Management API - Caching of Control Types

See above

<add key="Forms.Client.TraceEnabled" value="false" />

<add key="Forms.Client.Cache.TraceEnabled" value="false" />

Yes

Client API

See above

<add key="Forms.Client.Users.Cache.Enabled" value="true" />

<add key="Forms.Client.Users.Cache.InitialDuration" value="3600" />

<add key="Forms.Client.Users.Cache.SlidingDuration" value="300" />

<add key="Forms.Client.Users.Cache.Priority" value="Normal" />

Yes Caching of user information such as user name, e-mail address, description etc See above

<add key="Forms.Client.UserVersions.Cache.Enabled" value="true" />

<add key="Forms.Client.UserVersions.Cache.InitialDuration" value="30" />

<add key="Forms.Client.UserVersions.Cache.SlidingDuration" value="0" />

<add key="Forms.Client.UserVersions.Cache.Priority" value="High" />

Yes Caching of user information with relation to the last changes made on the database. See above

<add key="Forms.Client.UserSettings.Cache.Enabled" value="true" />

<add key="Forms.Client.UserSettings.Cache.InitialDuration" value="3600" />

<add key="Forms.Client.UserSettings.Cache.SlidingDuration" value="0" />

<add key="Forms.Client.UserSettings.Cache.Priority" value="High" />

Yes Caching of user settings on a View or Form including changes on the local machine See above

<add key="Forms.Client.Views.Cache.Enabled" value="true" />

<add key="Forms.Client.Views.Cache.InitialDuration" value="3600" />

<add key="Forms.Client.Views.Cache.SlidingDuration" value="0" />

v<add key="Forms.Client.Views.Cache.Priority" value="Normal" />

Yes Caching of View definitions See above

<add key="Forms.Client.Forms.Cache.Enabled" value="true" />

<add key="Forms.Client.Forms.Cache.InitialDuration" value="3600" />

<add key="Forms.Client.Forms.Cache.SlidingDuration" value="0" />

<add key="Forms.Client.Forms.Cache.Priority" value="Normal" />

Yes Caching of Form definitions See above

<add key="Forms.Client.ControlTypes.Cache.Enabled" value="true" />

<add key="Forms.Client.ControlTypes.Cache.InitialDuration" value="3600" />

<add key="Forms.Client.ControlTypes.Cache.SlidingDuration" value="0" />

<add key="Forms.Client.ControlTypes.Cache.Priority" value="High" />

Yes Caching of Control Types See above

<add key="Forms.Client.Themes.Cache.Enabled" value="true" />

<add key="Forms.Client.Themes.Cache.InitialDuration" value="3600" />

<add key="Forms.Client.Themes.Cache.SlidingDuration" value="0" />

<add key="Forms.Client.Themes.Cache.Priority" value="High" />

Yes Caching of Themes See above

Output Cache Settings

K2 implements IIS Output Caching to improve performance. The web.config files store Output Caching settings for the Runtime and Design time sites. Using the cachecontrol.ashx?m=clear command will clear this cache.

The Designer and Runtime sites have a separate cache and therefor, clearing the cache on the Designer site does not clear the cache on the Runtime site.
Changing these settings can cause dramatic performance problems and are only shown here for interest.
Node Change permitted? Description Example or Default Value

<caching>
      <outputCacheSettings>
        <outputCacheProfiles>
          <add name="RT profile" duration="3600" varyByParam="_ID;_NAME;_MODE;_STATE;_THEME;_OVERFLOWY;__CALLBACKID;_DEBUG;_RENDERWORKFLOWSTRIP;_DRAFTID;_NAVIGATEDSERVEREVENTS" varyByHeader="Accept-Encoding" varyByCustom="userversion;userculture;jq-legacy" enabled="true" location="Server" />
        </outputCacheProfiles>
      </outputCacheSettings>
    </caching>

No Output Cache Settings See below