Help Center>Foundation Help

Applies to:

Winshuttle Server 10.x Admin Tool Guide: Query caching options

The options available on the Query caching tab define the Winshuttle Server cache configuration for Query Web services. The corresponding element in the web.config file is <serverQueryCache>.

On this page

Query data caching is useful for Query scripts that take long to run but query data that doesn't change frequently. For example, such Query services can be used to fill drop-down boxes on a list or form and significantly reduce the time it takes for a form to load.

Query caching is disabled by default and must be enabled in the web.config file. Enable it to cache data for Query services that have caching enabled during publishing.

Winshuttle Server supports 2 types of caching:

  • Memory based caching (default): Manager Process memory stores the resulting data from a query. This is default option for query caching in Winshuttle Server. This type of caching is not persistent; the cache is cleared when the application pool is or IIS is reset.
  • Database based caching: This caches resulting data from a query in a database. Winshuttle SERVER supports both SQLite and SQL server as cache database options. You can use the included DDL scripts to create a cache database—the scripts can be found in the following path:

    C:\Program Files\Winshuttle\Server\Tools\DataImporter\ServerCacheDDL.sql

The <serverQueryCache> element

Back to top

In the Web.config file, the <serverQueryCache> element controls the Winshuttle Server query caching. It defines two attributes and two elements:

Attributes

  • Enabled: (true/false). Enables the caching of data for Query web services for Winshuttle Server.
  • Type: (MEMORY/DATABASE). The default setting is MEMORY. When set to DATABASE you can use a SQLite or SQL server database to cache data, in which case database caching is defined according to the configuration of the <databaseCache> element configuration. MEMORY and DATABASE are the only two valid values, and they are case-sensitive.

Elements:

  • <memoryCache> has no child attribute or elements; it is kept for future use.
  • <databaseCache> defines the database that is used in caching if the cache type is set to DATABASE. It contains two attributes: Type, which specifies the type of database, and Connectionstring, which is the connection string for the database.

Enabling Query Caching

Back to top
  1. On the Query Caching tab, select Enabled. Note that MEMORY caching is enabled by default.
  2. Click Apply Changes.




Enabling Database based Query Caching

Back to top
  1. On the Query Caching tab, select Enabled. Memory caching is enabled by default.
  2. From the Cache Type drop menu, select Database.
  3. From the Database Type drop menu, select the type of database (for example, MSSQL2008).
  4. In the Connection String field, type the connection string for the selected database. If you specified a SQLite database, type the path to the SQLite database file.
  5. Click Apply Changes.