function tripal_clear_remote_cache

3.x tripal_ws.api.inc tripal_clear_remote_cache($site_id)

Clears the cached remote site documentation and context.

When querying a remote website, the site's API documenation and page context is cached to make re-use of that information easier in the future. This function can be used to clear those caches.

Parameters

$site_id: The numeric site ID for the remote Tripal site.

Related topics

1 call to tripal_clear_remote_cache()
TripalEntityCollection::write in tripal/includes/TripalEntityCollection.inc
Writes the collection to a file using a given formatter.

File

tripal_ws/api/tripal_ws.api.inc, line 364
This file provides the Tripal Web Services API: a set of functions for interacting with the Tripal Web Services.

Code

function tripal_clear_remote_cache($site_id) {
  if (!$site_id) {
    throw new Exception('Please provide a numeric site ID for the tripal_clear_remote_cache function.');
  }
  cache_clear_all('trp_ws_context_' . $site_id, 'cache', TRUE);
  cache_clear_all('trp_ws_doc_' . $site_id, 'cache', TRUE);
}