ensure common context_stream_item_key between rails 2 and 3
fixes a problem where context stream items were not being invalidated correctly for rails 3 test plan: * set up an environment with a server running with rails 3 and delayed_jobs running with rails 2, and a redis cache store * create a published course with an active student * create an publish a new assignment * confirm that the "recent activity" dashboard on the course shows the new assignment message for the student fixes #CNVS-13205 Change-Id: I763d0d09c0c4b092b740f8b7a1e374cd954a5f16 Reviewed-on: https://gerrit.instructure.com/36034 Reviewed-by: Cody Cutrer <cody@instructure.com> Tested-by: Jenkins <jenkins@instructure.com> QA-Review: Clare Strong <clare@instructure.com> Product-Review: Clare Strong <clare@instructure.com>
This commit is contained in:
parent
c2dbb83883
commit
82311c08a2
|
@ -51,7 +51,7 @@ class StreamItemCache < ActiveRecord::Observer
|
|||
# stream item cache keys for a context can later be invalidated.
|
||||
def self.context_stream_item_key(context_type, context_id)
|
||||
return unless context_type
|
||||
Rails.cache.fetch(["context_stream_item_key", context_type, context_id].cache_key) do
|
||||
Rails.cache.fetch(["context_stream_item_key", context_type, context_id].cache_key, :no_rails3 => true) do
|
||||
"#{context_type.underscore}_#{context_id}-#{Time.now.to_i}"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue