Rails 5.2.1 - Model & Fragment Caching
问题 I am trying to setup Model and Fragment Caching in Rails 5.2.1 I have had success with Fragment caching, but I am still seeing database queries after implementing model caching for my Model. I have enabled development caching $ rails dev:cache Model Helper module LanguagesHelper def approved_languages Rails.cache.fetch("approved_languages") { Languages.is_active.is_approved } end end Controller class LanguagesController < ApplicationController include LanguagesHelper def index @languages =