Skip to content

Commit

Permalink
修正compile
Browse files Browse the repository at this point in the history
当文件已被缓存时, 让它失效, 然后重新缓存.
反之, 直接缓存.
  • Loading branch information
wilbur-yu committed Dec 13, 2021
1 parent 4db07d3 commit bace33e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Opcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ public function compile($force = false): ?array
try {
if (opcache_is_script_cached($file)) {
opcache_invalidate($file, $force);
opcache_compile_file($file);
}
opcache_compile_file($file);

++$compiled;
} catch (Throwable $e) {
Expand Down

0 comments on commit bace33e

Please sign in to comment.