Add doctrine cache to improve performance

pull/3215/head
Julio Montoya 6 years ago
parent c35c9ff566
commit 4811c45152
  1. 20
      config/packages/cache.yaml
  2. 11
      config/packages/doctrine.yaml

@ -1,23 +1,23 @@
framework:
cache:
directory: '%kernel.cache_dir%/pools'
pools:
cache.array:
adapter: cache.adapter.array
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system
# default_doctrine_provider: 'app.doctrine_cache'
# Put the unique name of your app here: the prefix seed
# Put the unique name of your app here: the prefix seed
# is used to compute stable namespaces for cache keys.
#prefix_seed: your_vendor_name/app_name
# The app cache caches to the filesystem by default.
# Other options include:
# Redis
#app: cache.adapter.redis
#default_redis_provider: redis://localhost
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
#app: cache.adapter.apcu
app: cache.adapter.filesystem
system: cache.adapter.system
# Namespaced pools use the above "app" backend by default
#pools:
#my.dedicated.cache: null

@ -16,7 +16,16 @@ doctrine:
types:
json: Doctrine\DBAL\Types\JsonType
orm:
auto_generate_proxy_classes: '%kernel.debug%'
auto_generate_proxy_classes: false
metadata_cache_driver:
type: 'pool'
pool: 'doctrine.system_cache_pool'
query_cache_driver:
type: 'pool'
pool: 'doctrine.system_cache_pool'
result_cache_driver:
type: 'pool'
pool: 'doctrine.result_cache_pool'
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
mappings:

Loading…
Cancel
Save