简体   繁体   中英

Rails clear cache on heroku

How can I clear the cache on Heroku?

I've tried heroku run rails c + Rails.cache.clear and receive the following error

Errno::ENOENT: No such file or directory @ dir_initialize - /app/tmp/cache/

I also tried heroku run rake tmp:clear (from this post). The task runs but when I go back into the console and run Rails.cache , nothing has changed.

How can I clear the cache?

Did you try this? (This works with Celadon Cedar with the Heroku Toolbelt package at least)

heroku run --app YOUR_APP_NAME rails runner Rails.cache.clear

Update

If the above does not work, try running:

heroku run rake tmp:create
heroku run rake tmp:clear

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM