File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -490,7 +490,7 @@ the :class:`Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerInterface` i
490490
491491 class MyCustomWarmer implements CacheWarmerInterface
492492 {
493- public function warmUp($cacheDirectory ): array
493+ public function warmUp(string $cacheDir, string $buildDir = null ): array
494494 {
495495 // ... do some sort of operations to "warm" your cache
496496
@@ -515,7 +515,15 @@ the :class:`Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerInterface` i
515515The ``warmUp() `` method must return an array with the files and classes to
516516preload. Files must be absolute paths and classes must be fully-qualified class
517517names. The only restriction is that files must be stored in the cache directory.
518- If you don't need to preload anything, return an empty array.
518+ If you don't need to preload anything, return an empty array. If read-only
519+ artefacts need to be created, you can store them in a different directory
520+ with the ``$buildDir `` parameter of the ``warmUp() `` method.
521+
522+ .. versionadded :: 6.4
523+
524+ The ``$buildDir `` parameter of the
525+ :method: `Symfony\\ Component\\ HttpKernel\\ CacheWarmer\\ WarmableInterface::warmUp `
526+ method was introduced in Symfony 6.4.
519527
520528The ``isOptional() `` method should return true if it's possible to use the
521529application without calling this cache warmer. In Symfony, optional warmers
You can’t perform that action at this time.
0 commit comments