Creating Caches
To create a cache for a page source, or to edit the settings of a cache that has already been created, click the Cache icon of the page source or select Cache Settings from the context menu of the root node of the page source. This displays the Configure Caching dialog (screenshot below). Set the properties of the cache as described below the screenshot, and click Save (to save the cache and its properties) or Save and Fill Cache (to save the cache as well as fill it with data from the data source).
All caches that have been saved to the server can be viewed in the Cache tab of the MobileTogether Server configuration page (web UI).
This dialog contains the following settings and controls:
•Name: The name of the cache that is being created or edited.
•Refresh button (located on the right-hand side of the Name field): Updates the connection to the server to check for the latest caches that match the structure of the current page source. If one or more caches have already been defined for the current page source, then the Name entry field becomes a combo box that enables you to select a cache from the available caches. If you wish to edit the selected cache, click Change Cache Settings. If you wish to create a new cache for the current page source, then click the Add New Cache button (located on the right-hand side of the Name field).
•Add New Cache button (located on the right-hand side of the Name field): Adds a new cache for the current page source and enters a default cache name in the Name field. You can edit the name.
•Change Cache Settings: Enabled when an existing cache is selected in the Name field. Click to load the selected cache's settings and edit these. Click Save (at the bottom of the dialog) to save the modified settings.
•Clear Cache: Clear the cache on the server.
•Active: Activate/deactivate the cache.
•Show an error: Specify whether an error should be displayed if the cache is missing or is deactivated when the solution is run.
•Save data in cache on first request: Data is saved from the data source when the solution first requests the data.
•Update cache periodically: Select to specify the frequency with which the cache should be filled.
•Save: Saves the cache and its properties.
•Save and Fill Cache: Saves the cache and fills it with data from the data source
Maximum cache entries
If the page source that is being cached is a database that has a SELECT statement containing one or more parameters, then you can set a maximum number of cache entries. This number specifies how many cache entries will be stored before the first cache entry is deleted and the latest cache entry is appended. This setting: (i) enables a new cache entry to be created each time a new parameter value is found, and (ii) limits the amount of server space that will be used for caches of this particular page source. In order to judge the amount of space that will be used, you can check the size of the cache in the Cache Overview dialog (see below) or in the Cache Overview tab of MobileTogether Server.