Skip to content

Instantly share code, notes, and snippets.

@carteni
Created February 7, 2017 08:47
Show Gist options
  • Save carteni/169b10575495c85c4c01dd7d1697b4af to your computer and use it in GitHub Desktop.
Save carteni/169b10575495c85c4c01dd7d1697b4af to your computer and use it in GitHub Desktop.
Symfony Validation / Caching ClassMetadata information using Doctrine FilesystemCache.
framework:
validation: { enable_annotations: true, cache: validator.mapping.cache.doctrine.filesystem_cache }
services:
cache.doctrine.filesystem_cache:
class: Doctrine\Common\Cache\FilesystemCache
arguments: ["%kernel.cache_dir%/validations"]
public: false
calls:
- [setNamespace, ["%validator.mapping.cache.prefix%"]]
validator.mapping.cache.doctrine.filesystem_cache:
class: Symfony\Component\Validator\Mapping\Cache\DoctrineCache
public: false
arguments: ["@cache.doctrine.filesystem_cache"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment