File tree 1 file changed +10
-2
lines changed
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
490
490
491
491
class MyCustomWarmer implements CacheWarmerInterface
492
492
{
493
- public function warmUp($cacheDirectory ): array
493
+ public function warmUp(string $cacheDir, string $buildDir = null ): array
494
494
{
495
495
// ... do some sort of operations to "warm" your cache
496
496
@@ -515,7 +515,15 @@ the :class:`Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerInterface` i
515
515
The ``warmUp() `` method must return an array with the files and classes to
516
516
preload. Files must be absolute paths and classes must be fully-qualified class
517
517
names. 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 `` argument of the ``warmUp() `` method.
521
+
522
+ .. versionadded :: 6.4
523
+
524
+ The ``buildDir `` argument of the
525
+ :method: `Symfony\\ Component\\ HttpKernel\\ CacheWarmer\\ WarmableInterface::warmUp `
526
+ method was introduced in Symfony 6.4.
519
527
520
528
The ``isOptional() `` method should return true if it's possible to use the
521
529
application without calling this cache warmer. In Symfony, optional warmers
You can’t perform that action at this time.
0 commit comments