MDL-32825 try to improve atomicity of cache file operations in themes and javascript

This commit is contained in:
Petr Skoda 2012-05-07 17:35:09 +02:00
parent 4dd63b6d70
commit 979d320722
6 changed files with 105 additions and 39 deletions

View file

@ -118,4 +118,11 @@ if ($type === 'editor') {
$cssfile = "$CFG->cachedir/theme/$themename/css/all.css";
css_store_css($theme, $cssfile, $allfiles);
}
// verify nothing failed in cache file creation
clearstatcache();
if (!file_exists($candidatesheet)) {
css_send_css_not_found();
}
css_send_cached_css($candidatesheet, $etag);