Created
February 7, 2017 08:42
-
-
Save carteni/53ffe5e2fbac4321ede9ae0efb993cc8 to your computer and use it in GitHub Desktop.
Symfony Validation / Caching ClassMetadata information using Predis.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework: | |
validation: { enable_annotations: true, cache: validator.mapping.cache.doctrine.predis_cache } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
# $ composer require predis/predis ^1.0 | |
predis_client: | |
class: Predis\Client | |
public: false | |
cache.doctrine.predis_cache: | |
class: Doctrine\Common\Cache\PredisCache | |
public: false | |
arguments: ["@predis_client"] | |
calls: | |
- [setNamespace, ["%validator.mapping.cache.prefix%"]] | |
validator.mapping.cache.doctrine.predis_cache: | |
class: Symfony\Component\Validator\Mapping\Cache\DoctrineCache | |
public: false | |
arguments: ["@cache.doctrine.predis_cache"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment