You are here

function PMPAPIDrupal::cacheKey in Public Media Platform API Integration 7

Generates a unique cache key.

Parameters

string $path: The path of the query

array $options: PMP query parameters

Return value

string A cache key

2 calls to PMPAPIDrupal::cacheKey()
PMPAPIDrupal::getDoc in classes/PMPAPIDrupal.php
Gets a doc from the PMP.
PMPAPIDrupal::pull in classes/PMPAPIDrupal.php
Pulls from the PMP.

File

classes/PMPAPIDrupal.php, line 329
Defines a class for PMP creation/transmission and retreival/parsing

Class

PMPAPIDrupal
@file

Code

function cacheKey($path, $options = array()) {
  ksort($options);
  $url = url($this->base . '/' . $path, array(
    'https' => TRUE,
    'absolute' => TRUE,
    'query' => $options,
  ));
  return 'pmpapi:' . $url;
}