-
-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from mnapoli/opcache
Enable opcache and use it with the file cache
- Loading branch information
Showing
6 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
opcache.enable=1 | ||
opcache.enable_cli=1 | ||
|
||
# Store the opcodes into a file cache instead of memory | ||
# Since PHP runs on lambdas with a new process each time the memory cache is lost | ||
opcache.file_cache="/tmp/.bref/opcache" | ||
# Disable the memory cache since it's useless | ||
# In my tests it allows to gain 30% of response time in a classic API controller | ||
opcache.file_cache_only=1 | ||
# Skip this check to save a it | ||
opcache.validate_permission=0 | ||
|
||
# The code is readonly on lambdas so it never changes | ||
opcache.validate_timestamps=0 | ||
|
||
# Set sane values, modern PHP applications have higher needs than opcache's defaults | ||
# See https://tideways.com/profiler/blog/fine-tune-your-opcache-configuration-to-avoid-caching-suprises | ||
opcache.memory_consumption=128 | ||
opcache.max_accelerated_files=10000 | ||
|
||
extension_dir=/var/task/.bref/bin/ext | ||
zend_extension=opcache.so |