You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just upgraded my AMS gem to 0.10.0.rc1 in hopes of getting some better caching functionality. I am trying to cache some App Label and the serializer there looks like this:
class AppLabelSerializer < ActiveModel::Serializer
cache key: 'app_label', expires_in: 3.hours
attributes :id, :key, :label, :label_plural
def key
object.app_label_dictionary.key
end
end
And then I hit one of the AppLabel end points with PostMan and I get this error:
NoMethodError (undefined method `fetch_or_store' for #<ThreadSafe::Cache:0x007fcf70821378>):
app/controllers/v1/app_labels_controller.rb:22:in `auth_index'
I checked app_labels_controller.rb on line 22 and it is this method:
def auth_index
render json: AppLabel.non_event
end