You are here

function advagg_drupal_hash_base64 in Advanced CSS/JS Aggregation 7.2

Given a filename calculate the hash for it. Uses static cache.

Parameters

string $file: Filename.

Return value

string hash of filename.

4 calls to advagg_drupal_hash_base64()
advagg_get_css_aggregate_contents in ./advagg.missing.inc
Given a list of files, grab their contents and glue it into one big string.
advagg_get_info_on_files in ./advagg.inc
Given a filename calculate various hashes and gather meta data.
advagg_get_js_aggregate_contents in ./advagg.missing.inc
Given a list of files, grab their contents and glue it into one big string.
advagg_load_files_info_into_static_cache in ./advagg.inc
Load cache bin file info in static cache.
1 string reference to 'advagg_drupal_hash_base64'
advagg_push_new_changes in ./advagg.cache.inc
Flush the correct caches so CSS/JS changes go live.

File

./advagg.inc, line 588
Advanced CSS/JS aggregation module.

Code

function advagg_drupal_hash_base64($file) {

  // Get the static cache of this data.
  $cached_data =& drupal_static('advagg_drupal_hash_base64', array());
  if (!array_key_exists($file, $cached_data)) {
    $cached_data[$file] = drupal_hash_base64($file);
  }
  return $cached_data[$file];
}