This commit is contained in:
Ad Schellevis 2018-09-03 20:56:00 +02:00
parent 4465697f3a
commit 0453bdf58c
1 changed files with 15 additions and 0 deletions

View File

@ -72,6 +72,21 @@ function view_file_exists($filename)
return file_exists($filename);
}
/**
* return appended version string with a hash for proper caching for currently installed version
* @param string $url to make cache-safe
* @return string
*/
function view_cache_safe($url)
{
$myview = \Phalcon\DI::getDefault()->get('view');
if (!empty($myview->product_hash)) {
return "{$url}?v={$myview->product_hash}";
}
return $url;
}
try {
/**
* Read the configuration