You are here

function brightcove_cache_get in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.3 brightcove.module \brightcove_cache_get()
  2. 7.4 brightcove.module \brightcove_cache_get()
  3. 7.5 brightcove.module \brightcove_cache_get()
  4. 7.6 brightcove.module \brightcove_cache_get()

Return the cached data based on the type of the caching.

Parameters

$cid: The id of the cache.

Return value

mixed The cached data, if exists, FALSE otherwise.

7 calls to brightcove_cache_get()
brightcove_get_playlists in ./brightcove.playlist.inc
Get the playlists from Brightcove.
brightcove_load_playlist in ./brightcove.playlist.inc
Loads a Playlist object.
brightcove_load_video in ./brightcove.module
Loads Brightcove video from CMS API.
brightcove_player_load_all in ./brightcove.module
Load all players.
theme_brightcove_field_image in ./brightcove_field.formatters.inc
Theme function to render brightcove images.

... See full list

File

./brightcove.module, line 3140
Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.

Code

function brightcove_cache_get($cid) {

  // If cache is enabled.
  if (variable_get('brightcove_cache_enabled', TRUE)) {
    $cache = cache_get($cid, 'cache_brightcove');
    if ($cache) {
      return $cache->data;
    }
  }
  return FALSE;
}