簡體   English   中英

Rails在heroku上清除緩存

[英]Rails clear cache on heroku

如何清除Heroku上的緩存?

我已經嘗試過heroku run rails c + Rails.cache.clear並收到以下錯誤

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

我也嘗試過heroku run rake tmp:clear (來自這篇文章)。 任務運行但是當我回到控制台並運行Rails.cache ,沒有任何改變。

如何清除緩存?

你試過這個嗎? (這與至少使用Heroku Toolbelt package Celadon Cedar一起使用)

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

更新

如果上述方法無效,請嘗試運行:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM