DoctrineMongoDBBundle icon indicating copy to clipboard operation
DoctrineMongoDBBundle copied to clipboard

Add Configless Metadata Cache

Open alcaeus opened this issue 4 years ago • 0 comments

This PR deprecates the metadata_cache_driver config key in favour of automatic configuration. In debug mode, it creates an ArrayAdapter, meaning that the cache is only valid per request. This is usually desired in a development environment. When debug is disabled, it creates a PhpArrayAdapter, backed by an array cache. The cache is warmed up and stored in the file system. Since this information shouldn't be shared between multiple instances of the code, it is only logical to store this in the cache folder in an efficient format. This also mirrors a decision made in the ORM bundle to deprecate the config.

Note: This PR contains a commit from #674. I'll rebase this PR once the other one has been merged.

alcaeus avatar May 19 '21 11:05 alcaeus