You are here

function mp3player_rebuild_cache in MP3 Player 6

Rebuild player settings cache.

4 calls to mp3player_rebuild_cache()
mp3player_player_delete_submit in ./mp3player.module
Delete a player.
mp3player_player_edit_submit in ./mp3player.module
Edit a player.
mp3player_player_submit in ./mp3player.module
Add a new player.
theme_mp3player in ./mp3player.module
Setup theme function for the MP3 Player.

File

./mp3player.module, line 1095
mp3player main module file.

Code

function mp3player_rebuild_cache() {
  $players = mp3player_players();
  foreach ($players as $pid => $player) {
    if ($pid == 1) {

      //Default Player
      cache_set('mp3player_default', mp3player_player_default_settings());
    }
    else {
      cache_set('mp3player_player_' . $player['name'], mp3player_player_settings($pid));
    }
  }
  drupal_rebuild_theme_registry();
  if (variable_get('mp3player_suppress', 'no') == 'no') {
    drupal_set_message(t('MP3 Player cache updated.'));
  }
}