I have implemented Redis cache for my application data caching. When I try to use cache in my local machine and try to fetch data from cache I get following error : ArgumentError: undefined class/module User::FriendlyIdActiveRecordRelation
After searching google I find that when we fetch from cache it coverts object to our model type. So we need to load all the models in application when we start server (just like happening in production environment). I have created initializer to do that. But still it is not working. What can be the work around to solve this in development environment ?
Thank you.
Aucun commentaire:
Enregistrer un commentaire