Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache doctrine responses #1555

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions api/config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ doctrine:
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
metadata_cache_driver:
type: service
id: doctrine.system_cache_provider
query_cache_driver:
type: service
id: doctrine.system_cache_provider
result_cache_driver:
type: service
id: doctrine.result_cache_provider

dql:
string_functions:
regexp_replace: DoctrineExtensions\Query\Postgresql\RegexpReplace
1 change: 1 addition & 0 deletions api/config/packages/framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ framework:
cache:
prefix_seed: commonground_gateway_cache
app: cache.adapter.redis
system: cache.adapter.redis
default_redis_provider: "redis://%env(REDIS_HOST)%:%env(int:REDIS_PORT)%"
parameters:
samesite: none
Expand Down
9 changes: 9 additions & 0 deletions api/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,12 @@ services:
class: App\Logger\SessionDataProcessor
tags:
- { name: monolog.processor }

doctrine.result_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
arguments:
- '@doctrine.result_cache_pool'
doctrine.system_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
arguments:
- '@doctrine.system_cache_pool'
Loading