Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function saveCacheBust($strApplicationFileContents = '', $strCacheBustFile = '') |
||
31 | { |
||
32 | // get contents signature |
||
33 | $strNewCacheBust = md5($strApplicationFileContents); |
||
34 | |||
35 | // get prior cache bust |
||
36 | $strPriorCacheBust = $this->getCacheBust($strCacheBustFile); |
||
37 | |||
38 | // if unchanged, stop here |
||
39 | if ($strPriorCacheBust == $strNewCacheBust) { |
||
40 | return $strPriorCacheBust; |
||
41 | } |
||
42 | |||
43 | // set new cache bust |
||
44 | file_put_contents($strCacheBustFile, $strNewCacheBust); |
||
45 | |||
46 | // return new cache bust |
||
47 | return $strNewCacheBust; |
||
48 | } |
||
49 | |||
68 |