diff --git a/Resources/doc/commands.md b/Resources/doc/commands.md new file mode 100644 index 000000000..2cf692ae5 --- /dev/null +++ b/Resources/doc/commands.md @@ -0,0 +1,68 @@ +# Commands + +## Remove cache + + +All cache for a given paths will be removed: + +``` bash +$ php app/console liip:imagine:cache:remove path1 path +``` + + +If you use --filters parameter, all cache for a given filters will be lost: + +``` bash +$ php app/console liip:imagine:cache:remove --filters=thumb1 --filters=thumb2 +``` + +You can combine these parameters: + +``` bash +$ php app/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 : + +``` bash +$ php app/console liip:imagine:cache:remove +``` + +## Resolve cache + + +``` bash +$ php app/console liip:imagine:cache:resolve path1 path2 --filters=thumb1 +``` + +Cache for the two paths will be resolved using the passed filter. +As a result you will get: +``` bash + http://localhost/media/cache/thumb1/path1 + http://localhost/media/cache/thumb1/path2 +``` + +You can pass few filters: + +``` bash +$ php app/console liip:imagine:cache:resolve path1 --filters=thumb1 --filters=thumb2 +``` + +As a result you will get: +``` bash + http://localhost/media/cache/thumb1/path1 + http://localhost/media/cache/thumb2/path1 +``` + +If you omit --filters parameter then to resolve given paths will be used all configured and available filters in application: +``` bash +$ php app/console liip:imagine:cache:resolve path1 +``` + +As a result you will get: +``` bash + http://localhost/media/cache/thumb1/path1 + http://localhost/media/cache/thumb2/path1 +``` + +[Back to the index](index.md) diff --git a/Resources/doc/index.md b/Resources/doc/index.md index 04f83c5be..4d29ef97c 100644 --- a/Resources/doc/index.md +++ b/Resources/doc/index.md @@ -7,3 +7,4 @@ * [DataLoaders](data-loaders.md) * [CacheResolvers](cache-resolvers.md) * [CacheManager](cache-manager.md) +* [Commands](commands.md)