我有這樣的設置 config.cache_store = :redis_store, ENV['REDIS_CACHE_URL']
Rails.cache.clear返回nil
$ redis-cli
127.0.0.1:6379> set random_key 1
OK
現在我去到控制檯,並做Rails.cache.clear
返回零
而且我仍然能夠訪問關鍵random_key
在redis-cli。它沒有清除緩存。
我不能讀什麼這裏Rails.cache
回報太ruby/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.8/lib/rails.rb
是Rails.cache.clear應該返回true?
如果我的理解錯誤,有人能幫助我嗎?
謝謝,詳細解釋:) – gates