Conditions | 4 |
Paths | 3 |
Total Lines | 23 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function clearAction() |
||
37 | { |
||
38 | $tags = $this->params('tags', null); |
||
39 | if (null === $tags) { |
||
40 | $this->console->writeLine('You should provide tags'); |
||
41 | return; |
||
42 | } |
||
43 | |||
44 | $tags = explode(',', $tags); |
||
45 | $result = false; |
||
46 | try { |
||
47 | $result = $this->getCacheService()->clearByTags($tags); |
||
48 | } catch (UnsupportedAdapterException $exception) { |
||
49 | $this->console->writeLine($exception->getMessage()); |
||
50 | } |
||
51 | |||
52 | $this->console->writeLine( |
||
53 | sprintf( |
||
54 | 'Cache invalidation %s', |
||
55 | $result ? 'succeeded' : 'failed' |
||
56 | ) |
||
57 | ); |
||
58 | } |
||
59 | |||
70 |