Fix EZP-22419: Clearing cache in CLI when eZ Publish is not yet
installed leads to database error

Blocks Behat tests. See
https://github.com/ezsystems/ezpublish-community/pull/115