Difference between revisions of "View Cache"
Line 19: | Line 19: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | == Web Service | + | == Web Service Interface == |
+ | Use the these web service members to gain status and runtime information of the View Cache. Mmore detailed information and a comprehensive list of all members and data types are located in the {{UBIK}} class documentation. | ||
+ | |||
+ | === AddUpdateInformation === | ||
+ | The web service provides a method to add content to be pushed to the clients: | ||
+ | <source lang="csharp"> | ||
+ | /// <summary> | ||
+ | /// AddUpdateInformation provides the possibility to register data to be forwarded (pushed) to the clients | ||
+ | /// </summary> | ||
+ | /// <param name="data">Data which should be pushed to the clients, and criteria which must be fullfilled for pushing</param> | ||
+ | /// <returns>true as adding the information was successfull</returns> | ||
+ | [OperationContract] | ||
+ | [WebInvoke(UriTemplate = "AddUpdateInformation", Method = "POST", | ||
+ | RequestFormat = WebMessageFormat.Json, | ||
+ | BodyStyle = WebMessageBodyStyle.Bare, | ||
+ | ResponseFormat = WebMessageFormat.Json)] | ||
+ | bool AddUpdateInformation(PushUpdateDefinition data); | ||
+ | </source > | ||
+ | |||
+ | === DebugInfo === | ||
+ | The push web service provides access to its current status via a debug - info method. Use this to retrieve information about the current status of the web service. | ||
+ | This method can also be called via a web browswer by browsing the according URL. | ||
+ | <source lang="csharp"> | ||
+ | /// <summary> | ||
+ | /// Delivers info about the current status of the Push Service. | ||
+ | /// </summary> | ||
+ | /// <param name="token">authentication token</param> | ||
+ | [OperationContract] | ||
+ | [WebInvoke(UriTemplate = "DebugInfo/{token}", Method = "GET", | ||
+ | RequestFormat = WebMessageFormat.Json, | ||
+ | ResponseFormat = WebMessageFormat.Json)] | ||
+ | string DebugInfo(string token); | ||
+ | </source> | ||
+ | |||
+ | === Reset === | ||
+ | To trigger reinitialization (reset) of the push web service from extern, call this method via a web browser. | ||
+ | <source lang="csharp"> | ||
+ | /// <summary> | ||
+ | /// Resets the Cache of the Push Service | ||
+ | /// </summary> | ||
+ | /// <param name="token">authentication token</param> | ||
+ | [OperationContract] | ||
+ | [WebInvoke(UriTemplate = "Reset/{token}", Method = "GET", | ||
+ | RequestFormat = WebMessageFormat.Json, | ||
+ | ResponseFormat = WebMessageFormat.Json)] | ||
+ | void Reset(string token); | ||
+ | </source> | ||
+ | |||
+ | |||
+ | |||
[[Category:Installing]] | [[Category:Installing]] | ||
[[Category:Web service]] | [[Category:Web service]] |
Revision as of 12:26, 7 May 2015
The View Cache feature increases the performance of the Web Service by caching the data to be published and sent to the clients. All content data as well as the hierarchies, as defined by the View and in the ACM, is evaluated and cached internally. Once the cache has been initialized, its status and additional information can be retrieved by web service methods.
Contents
Enabling the View Cache
The View Cache features needs to be enabled in the web.config file of the corresponding web service.
Area | Setting | Description |
---|---|---|
appSettings | UBIK.Service.EnableViewCachage | Enable (1) / Disable (0) the view cache feature for this web service |
...
<add key="UBIK.Service.EnableViewCache" value="1" />
</appSettings>
Web Service Interface
Use the these web service members to gain status and runtime information of the View Cache. Mmore detailed information and a comprehensive list of all members and data types are located in the UBIK® class documentation.
AddUpdateInformation
The web service provides a method to add content to be pushed to the clients:
/// AddUpdateInformation provides the possibility to register data to be forwarded (pushed) to the clients
/// </summary>
/// <param name="data">Data which should be pushed to the clients, and criteria which must be fullfilled for pushing</param>
/// <returns>true as adding the information was successfull</returns>
[OperationContract]
[WebInvoke(UriTemplate = "AddUpdateInformation", Method = "POST",
RequestFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Bare,
ResponseFormat = WebMessageFormat.Json)]
bool AddUpdateInformation(PushUpdateDefinition data);
DebugInfo
The push web service provides access to its current status via a debug - info method. Use this to retrieve information about the current status of the web service. This method can also be called via a web browswer by browsing the according URL.
/// Delivers info about the current status of the Push Service.
/// </summary>
/// <param name="token">authentication token</param>
[OperationContract]
[WebInvoke(UriTemplate = "DebugInfo/{token}", Method = "GET",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json)]
string DebugInfo(string token);
Reset
To trigger reinitialization (reset) of the push web service from extern, call this method via a web browser.
/// Resets the Cache of the Push Service
/// </summary>
/// <param name="token">authentication token</param>
[OperationContract]
[WebInvoke(UriTemplate = "Reset/{token}", Method = "GET",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json)]
void Reset(string token);