Console Commands

Edit this page

Console Commands

Remove Cache

All cache for a given paths will be removed:

1
$ php bin/console liip:imagine:cache:remove path1 path

If you use --filters parameter, all cache for a given filters will be lost:

1
$ php bin/console liip:imagine:cache:remove --filters=thumb1 --filters=thumb2

You can combine these parameters:

1
$ php bin/console liip:imagine:cache:remove path1 path2 --filters=thumb1 --filters=thumb2

Cache for all paths and filters will be lost when executing this command without parameters:

1
$ php bin/console liip:imagine:cache:remove

Warm up Cache

Note

To automate cache warming, have a look at the Symfony Messenger integration.

1
$ php bin/console liip:imagine:cache:resolve path1 path2 --filters=thumb1

The cache for those two paths will be warmed up for the specified filter set. As a result you will get:

1
2
http://localhost/media/cache/thumb1/path1
http://localhost/media/cache/thumb1/path2

You can specify which filter sets to warm up:

1
$ php bin/console liip:imagine:cache:resolve path1 --filters=thumb1 --filters=thumb2

As a result you will get:

1
2
http://localhost/media/cache/thumb1/path1
http://localhost/media/cache/thumb2/path1

If you omit --filters, the image will be warmed up for all available filters:

1
$ php bin/console liip:imagine:cache:resolve path1

As a result you will get:

1
2
http://localhost/media/cache/thumb1/path1
http://localhost/media/cache/thumb2/path1
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.