Skip to content

Commit 9b9bb7c

Browse files
authored
Update doc. Remove class ApcCache from doc
Class `ApcCache` was deprecated since 2.8 and removed from 3.0 version. Update doc.
1 parent de04468 commit 9b9bb7c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

components/validator/resources.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@ can slow down your application because each file needs to be parsed, validated
150150
and converted into a :class:`Symfony\\Component\\Validator\\Mapping\\ClassMetadata`
151151
instance. To solve this problem, you can cache the ``ClassMetadata`` information.
152152

153-
The Validator component comes with an
154-
:class:`Symfony\\Component\\Validator\\Mapping\\Cache\\ApcCache`
155-
implementation. You can easily create other cachers by creating a class which
153+
You can easily create cachers by creating a class which
156154
implements :class:`Symfony\\Component\\Validator\\Mapping\\Cache\\CacheInterface`.
157155

158156
.. note::
@@ -168,11 +166,10 @@ Enable the cache calling the
168166
method of the Validator builder::
169167

170168
use Symfony\Component\Validator\Validation;
171-
use Symfony\Component\Validator\Mapping\Cache\ApcCache;
172169

173170
$validator = Validation::createValidatorBuilder()
174171
// ... add loaders
175-
->setMetadataCache(new ApcCache('some_apc_prefix'));
172+
->setMetadataCache(new SomeImplementCacheInterface());
176173
->getValidator();
177174

178175
Using a Custom MetadataFactory

0 commit comments

Comments
 (0)