You are here

function pwa_serviceworker_file_data in Progressive Web App 7

Returns the JS of the service worker.

Return value

mixed

1 string reference to 'pwa_serviceworker_file_data'
pwa_menu in ./pwa.module
Implements hook_menu().

File

./pwa.pages.inc, line 24

Code

function pwa_serviceworker_file_data($version = 1) {
  $data = cache_get('pwa:serviceworker', 'cache');
  if ($data) {
    $data = $data->data;
  }
  else {
    $data = _pwa_serviceworker_file();
    cache_set('pwa:serviceworker', $data, 'cache');
  }
  return $data;
}