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
In the talk show view, the current user is being used in the cache key. I believe this is only used for caching whether a talk is cached or not. This increases the stored cache significantly as a _talk has to be cached for every user who views it. Instead it should use a boolean value to indicate if the talk is watched or not in order for the partial to be cached and shared amongst users.
I agree this cache key should be simplified. This being said I think most of the visitors are unauthenticated so they all end up in the same cache key.
Probably we could remove this part from the cache key @talk.watched_talks.where(user: Current.user) if we wheere to add a touch: true to the watched_talk user association
In the talk show view, the current user is being used in the cache key. I believe this is only used for caching whether a talk is cached or not. This increases the stored cache significantly as a _talk has to be cached for every user who views it. Instead it should use a boolean value to indicate if the talk is watched or not in order for the partial to be cached and shared amongst users.
rubyvideo/app/views/talks/show.html.erb
Line 17 in 20b2b1a
The text was updated successfully, but these errors were encountered: