You are here

function pmpapi_clear_pmp_cache in Public Media Platform API Integration 7

Clears locally cached PMP key/value pairs.

Parameters

string $key: A key of a cache PMP value.

1 call to pmpapi_clear_pmp_cache()
pmpapi_config_form_submit in ./pmpapi.admin.inc
Form submission handler for pmpapi_push_admin_config().

File

./pmpapi.module, line 265
Creates basic calls to the PMP API.

Code

function pmpapi_clear_pmp_cache($key = '') {
  $pmp = new PMPAPIDrupal();
  if (empty($pmp->errors)) {
    if ($key) {
      $pmp
        ->cacheClear($key);
    }
    else {
      $pmp
        ->cacheClearAll();
    }
  }
}