orm
                                
                                
                                
                                    orm copied to clipboard
                            
                            
                            
                        How to configure the TTL for the cache driver
I am trying to configure APC as cache driver for metadata and query cache. On the provided doctrine.php config it is clear to do so using the equivalent ENV vars.
One thing that I did not find is how to pass the ttl parameter so I can control the expected time to live on those.
Using version 1.4
I don't think you can set TTL for metadata? This is handled by doctrine. See: https://github.com/doctrine/persistence/blob/master/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php#L193
TTL on query is per-query. You must set this on the QueryBuilder/Query object AFAIK.
BTW: It is preferable to use php_file for metadata-cache (adding it now (#433)). See: https://github.com/doctrine/orm/blob/2.7/docs/en/reference/caching.rst#phpfilecache