Prechádzať zdrojové kódy

Allow cache backends to be configured, fixes #333

Jordi Boggiano 11 rokov pred
rodič
commit
dc5def1f4c

+ 6 - 4
app/config/config_prod.yml

@@ -1,10 +1,10 @@
 imports:
     - { resource: config.yml }
 
-#doctrine:
-#    metadata_cache_driver: apc
-#    result_cache_driver: apc
-#    query_cache_driver: apc
+doctrine:
+    metadata_cache_driver: %doctrine_cache_backend%
+    result_cache_driver: %doctrine_cache_backend%
+    query_cache_driver: %doctrine_cache_backend%
 
 monolog:
     handlers:
@@ -20,6 +20,8 @@ monolog:
 framework:
     session:
         cookie_secure: %force_ssl%
+    validation:
+        cache: %validation_cache_backend%
 
 nelmio_security:
     clickjacking:

+ 4 - 0
app/config/parameters.yml.dist

@@ -33,3 +33,7 @@ parameters:
 
     # e.g. [127.0.0.1] if the app is running behind a reverse proxy on localhost
     trusted_proxies: ~
+
+    # set to apc to optimize things if it is available
+    validation_cache_backend: ~
+    doctrine_cache_backend: array