Skip to content
Snippets Groups Projects
Commit cd8179d7 authored by Scato Eggen's avatar Scato Eggen
Browse files

Invalidate opcache after writing a file

When opcache.validate_timestamps is disabled, then the new metadata will not be read after a metarefresh.
This can be solved by adding the metadata file to an opcache blacklist, but calling opcache_invalidate()
after writing a file is a nice out-of-the-box solution.

Hopefully, this will enable everybody that is using simplesamlphp to disable opcache.validate_timestamps
without running into problems.
parent 20da7652
No related branches found
No related tags found
No related merge requests found
......@@ -203,5 +203,9 @@ class System
'Error moving "'.$tmpFile.'" to "'.$filename.'": '.$error['message']
);
}
if (function_exists('opcache_invalidate')) {
opcache_invalidate($filename);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment