php bin/console doctrine:cache:clear-query-region
Clear a second-level cache query region
Usage
doctrine:cache:clear-query-region [--em EM] [--all] [--flush] [--] [<region-name>]
Arguments
region-name The query region to clear.
Options
--em Name of the entity manager to operate on
--all If defined, all query regions will be deleted/invalidated.
--flush If defined, all cache entries will be flushed.
Help
The doctrine:cache:clear-query-region command is meant to clear a second-level cache query region for an associated Entity Manager.
It is possible to delete/invalidate all query region, a specific query region or flushes the cache provider.
The execution type differ on how you execute the command.
If you want to invalidate all entries for the default query region this command would do the work:
doctrine:cache:clear-query-region
To invalidate entries for a specific query region you should use :
doctrine:cache:clear-query-region my_region_name
If you want to invalidate all entries for the all query region:
doctrine:cache:clear-query-region --all
Alternatively, if you want to flush the configured cache provider use this command:
doctrine:cache:clear-query-region my_region_name --flush
Finally, be aware that if --flush option is passed,
not all cache providers are able to flush entries, because of a limitation of its execution nature.