Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc for commands #533

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions Resources/doc/commands.md
Original file line number Diff line number Diff line change
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@makasim makes me think we should confirm in case someone provides no path or filter that its not accidentally

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lsmith77 sure!

```

## 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)
1 change: 1 addition & 0 deletions Resources/doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
* [DataLoaders](data-loaders.md)
* [CacheResolvers](cache-resolvers.md)
* [CacheManager](cache-manager.md)
* [Commands](commands.md)