Can the rails tmp/cache/assets files be safely deleted?

拈花ヽ惹草 提交于 2019-12-09 14:23:36

问题


I seem to have a TON of them in subfolders named for example

sprockets%2F76920e6913c3390459175ac8e6dfd44a3

They seem to contain binary data.

What are they for, why are there so many of them and most importantly, can these be safely removed? They take forever to scp.


回答1:


Yep! You can delete the whole tmp directory and it will get recreated.




回答2:


Yes, you can safely delete it.

The best way to delete will be running the following in the rails console:

Rails.cache.clear


来源:https://stackoverflow.com/questions/16989256/can-the-rails-tmp-cache-assets-files-be-safely-deleted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!