You are here

function media_acquiadam_cache_get in Media: Acquia DAM 7

Get locally cached Acquia DAM asset information.

Parameters

int $assetId: The Acquia DAM asset ID to get cached information for.

Return value

AcquiaDAM_Assets_AbstractAsset|false The Acquia DAM asset or FALSE.

1 call to media_acquiadam_cache_get()
media_acquiadam_get_helper in includes/media_acquiadam.helpers.inc
Asset/folder get helper that can load and store assets to cache.

File

includes/media_acquiadam.cache.inc, line 49
Cache helpers and associated logic.

Code

function media_acquiadam_cache_get($assetId) {
  $cache =& drupal_static(__FUNCTION__, []);
  if (empty($cache[$assetId])) {
    $item = media_acquiadam_cache_get_multiple([
      $assetId,
    ]);
    $cache[$assetId] = !empty($item[$assetId]) ? $item[$assetId]->data : FALSE;
  }
  return $cache[$assetId];
}