From 65833d623e90825e9b5ae3cd105425d314b9e23f Mon Sep 17 00:00:00 2001 From: Al Ganiev Date: Fri, 18 Dec 2015 14:49:01 +1000 Subject: [PATCH 1/4] rebased commands document patch, see #533 --- Resources/doc/commands.rst | 68 ++++++++++++++++++++++++++++++++++++++ Resources/doc/index.rst | 1 + 2 files changed, 69 insertions(+) create mode 100644 Resources/doc/commands.rst diff --git a/Resources/doc/commands.rst b/Resources/doc/commands.rst new file mode 100644 index 000000000..2cf692ae5 --- /dev/null +++ b/Resources/doc/commands.rst @@ -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.rst b/Resources/doc/index.rst index 4e5d65a51..8e5fcf0c8 100644 --- a/Resources/doc/index.rst +++ b/Resources/doc/index.rst @@ -13,3 +13,4 @@ performance, altered images can be cached locally and in Amazon S3 service. * :doc:`DataLoaders ` * :doc:`CacheResolvers ` * :doc:`CacheManager ` +* :doc:`Commands ` From 7c2e70e60d995d7d97a531abce9ccb303f9b8deb Mon Sep 17 00:00:00 2001 From: Al Ganiev Date: Fri, 18 Dec 2015 22:03:31 +1000 Subject: [PATCH 2/4] rewritten in rst format --- Resources/doc/commands.rst | 78 ++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 36 deletions(-) diff --git a/Resources/doc/commands.rst b/Resources/doc/commands.rst index 2cf692ae5..da4385b75 100644 --- a/Resources/doc/commands.rst +++ b/Resources/doc/commands.rst @@ -1,68 +1,74 @@ -# Commands - -## Remove cache +Commands +======== +Remove cache +------------ All cache for a given paths will be removed: -``` bash -$ php app/console liip:imagine:cache:remove path1 path -``` +.. code-block:: bash + + $ php app/console liip:imagine:cache:remove path1 path +If you use ``--filters`` parameter, all cache for a given filters will be lost: -If you use --filters parameter, all cache for a given filters will be lost: +.. code-block:: bash -``` bash -$ php app/console liip:imagine:cache:remove --filters=thumb1 --filters=thumb2 -``` + $ 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 -``` +.. code-block:: 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: -Cache for all paths and filters will be lost when executing this command without parameters : +.. code-block:: bash + $ php app/console liip:imagine:cache:remove -``` bash -$ php app/console liip:imagine:cache:remove -``` -## Resolve cache +Resolve cache +------------- +.. code-block:: bash + + $ php app/console liip:imagine:cache:resolve path1 path2 --filters=thumb1 -``` 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 + +.. code-block:: 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 -``` +.. code-block:: bash + + $ php app/console liip:imagine:cache:resolve path1 --filters=thumb1 --filters=thumb2 + As a result you will get: -``` bash + +.. code-block:: 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 -``` + +If you omit ``--filters`` parameter then to resolve given paths will be used all configured and available filters in application: + +.. code-block:: bash + $ php app/console liip:imagine:cache:resolve path1 As a result you will get: -``` bash + +.. code-block:: bash + http://localhost/media/cache/thumb1/path1 http://localhost/media/cache/thumb2/path1 -``` - -[Back to the index](index.md) From a775d2f56b7e744773556635a3bd58e8c1e58018 Mon Sep 17 00:00:00 2001 From: Al Ganiev Date: Fri, 18 Dec 2015 22:27:41 +1000 Subject: [PATCH 3/4] limiting strings length up to 80 chars --- Resources/doc/commands.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Resources/doc/commands.rst b/Resources/doc/commands.rst index da4385b75..9eac28e0c 100644 --- a/Resources/doc/commands.rst +++ b/Resources/doc/commands.rst @@ -23,7 +23,8 @@ You can combine these parameters: $ 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: +Cache for all paths and filters will be lost when executing this command +without parameters: .. code-block:: bash $ php app/console liip:imagine:cache:remove @@ -61,7 +62,8 @@ As a result you will get: 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: +If you omit ``--filters`` parameter then to resolve given paths will be used +all configured and available filters in application: .. code-block:: bash $ php app/console liip:imagine:cache:resolve path1 From 4a7ca48647441369315fd186e7bec08d4e69285f Mon Sep 17 00:00:00 2001 From: Al Ganiev Date: Tue, 29 Dec 2015 02:32:18 +1000 Subject: [PATCH 4/4] fixed issues mentioned by Javier --- Resources/doc/commands.rst | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Resources/doc/commands.rst b/Resources/doc/commands.rst index 9eac28e0c..d985b7184 100644 --- a/Resources/doc/commands.rst +++ b/Resources/doc/commands.rst @@ -22,13 +22,12 @@ You can combine these parameters: $ 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: .. code-block:: bash - $ php app/console liip:imagine:cache:remove + $ php app/console liip:imagine:cache:remove Resolve cache ------------- @@ -37,40 +36,37 @@ Resolve cache $ 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: -.. code-block:: bash +.. code-block:: text http://localhost/media/cache/thumb1/path1 http://localhost/media/cache/thumb1/path2 - You can pass few filters: .. code-block:: bash $ php app/console liip:imagine:cache:resolve path1 --filters=thumb1 --filters=thumb2 - As a result you will get: -.. code-block:: bash +.. code-block:: text 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: .. code-block:: bash + $ php app/console liip:imagine:cache:resolve path1 As a result you will get: -.. code-block:: bash +.. code-block:: text http://localhost/media/cache/thumb1/path1 http://localhost/media/cache/thumb2/path1