Sometimes I forget the difference between the functionality of this rake task and Rails method. This is a reference post I wanted to have that I hope you find helpful.
This task only removes files from the Rails file system.
This will clear objects stored in the application cache, unless the value for
config.cache_store for your application is set to
:file_store. In the latter case
Rails.cache.clear will be functionally the same as
Post details source.