Move `dev:cache` rake task to use Rails::Command
#33559

anniecodes wants to merge anniecodes:dev-task into rails:master

We do not currently have an analysis of these two commits