Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
のようなことをする方法はありますか
Rails.cache.fetch("id..", expire_in: 1.day, expire_at: midnight) do #... end
ありがとう!
整数が必要な場合は、小数を取得しないように注意してください...
>_ bundle exec rails console Loading development environment (Rails 6.0.3.2) >> Time.now.end_of_day + 1.day - Time.now 169207.001996682 >> (Time.now.end_of_day + 1.day - Time.now).to_i 169204 >>