Oracle Web Services On Demand Guide > Best Practices for Designing Client Application > Best Practices for Integration Design >

Flushing of Caches


In Oracle CRM On Demand, there are internal caches that store metadata information such as field customization data, access or privilege settings, book information and so on.

For stateless Web services only, users can flush the caches to reload any metadata information that has changed recently. You use the MetadataChangeSummaryQueryPage method to determine whether there have been any metadata changes; see MetadataChangeSummaryQueryPage.

In the case of session-based Web services (stateful Web Services), the same flushing of caches would only occur on logging in again.

Best Practices for Flushing of Caches

The best practices for flushing of the caches are as follows:

  • You are advised not to flush caches unless really necessary, because it affects throughput.
  • If you detect stale metadata, you use a flush cache flag to reload the caches.

You can use the MetadataChangeSummaryQueryPage method to check whether the metadata has changed.

Usage

To flush the caches, you include the SOAP header element <FlushCache> in requests. The element can contain the values true or 1 to indicate that caches are to be flushed. Any other value is considered as false.

The following shows a SOAP message containing the <FlushCache> element:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

<soap:Header>

<wsse:Security>

<wsse:UsernameToken>

<wsse:Username>user@ondemand.com</wsse:Username>

<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>

</wsse:UsernameToken>

</wsse:Security>

<FlushCache xmlns="urn:crmondemand/ws">true</FlushCache>

</soap:Header>

<soap:Body>

... Input request or payload here ......

</soap:Body>

</soap:Envelope>

Oracle Web Services On Demand Guide, Version 23.0 (Oracle CRM On Demand Release 35) Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices.