(Enhancement for developers) Use a timestamp defined at compile time to workaround client-side caching problems during development.

SVN:trunk[5690]
This commit is contained in:
Denis Flaven
2018-04-18 13:45:08 +00:00
parent d32db977eb
commit 9c3b053727
9 changed files with 41 additions and 24 deletions

View File

@@ -1887,4 +1887,19 @@ class utils
}
return $aCleanHeaders;
}
/**
* Return a string based on compilation time or (if not available because the datamodel has not been loaded)
* the version of iTop. This string is useful to prevent browser side caching of content that may vary at each
* (re)installation of iTop (especially during development).
* @return string
*/
public function GetCacheBusterTimestamp()
{
if(!defined('COMPILATION_TIMESTAMP'))
{
return ITOP_VERSION;
}
return COMPILATION_TIMESTAMP;
}
}