-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WPK-17 – configure Redis caching (+ opcache)
- Loading branch information
Showing
8 changed files
with
38 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
framework: | ||
cache: | ||
# Unique name of your app: used to compute stable namespaces for cache keys. | ||
#prefix_seed: your_vendor_name/app_name | ||
prefix_seed: "wpackagist/%env(APP_ENV)%" | ||
|
||
# The "app" cache stores to the filesystem by default. | ||
# The data in this cache should persist between deploys. | ||
# Other options include: | ||
|
||
# Redis | ||
#app: cache.adapter.redis | ||
#default_redis_provider: redis://localhost | ||
app: cache.adapter.redis | ||
system: cache.adapter.redis | ||
default_redis_provider: "redis://%env(REDIS_HOST)%" | ||
|
||
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) | ||
#app: cache.adapter.apcu | ||
|
||
# Namespaced pools use the above "app" backend by default | ||
#pools: | ||
#my.dedicated.cache: null | ||
pools: | ||
doctrine.result_cache_pool: | ||
adapter: cache.app | ||
doctrine.system_cache_pool: | ||
adapter: cache.system |
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 |
---|---|---|
@@ -1,2 +1,19 @@ | ||
memory_limit = -1 | ||
date.timezone = "UTC" | ||
|
||
; See https://secure.php.net/manual/en/opcache.configuration.php#ini.opcache.max-accelerated-files | ||
; and https://www.scalingphpbook.com/blog/2014/02/14/best-zend-opcache-settings.html | ||
opcache.max_accelerated_files = 7963 | ||
|
||
; We have a good amount of memory available, so increase this from the default 128MB | ||
opcache.memory_consumption = 384 | ||
|
||
; Increase from default 8MB | ||
opcache.interned_strings_buffer = 32 | ||
|
||
; As recommended by https://secure.php.net/manual/en/opcache.installation.php and | ||
; https://www.scalingphpbook.com/blog/2014/02/14/best-zend-opcache-settings.html | ||
opcache.fast_shutdown = 1 | ||
|
||
; Task definition artifacts are immutable on ECS and cache check time is 0 on local -> may as well make tasks faster | ||
opcache.enable_cli = 1 |
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