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