parent
23a1f84ae7
commit
f58b530484
@ -0,0 +1,17 @@
|
||||
#coding=utf-8
|
||||
|
||||
module Trustie
|
||||
module Cache
|
||||
module ClearCourseEvent
|
||||
def self.included(base)
|
||||
base.class_eval{
|
||||
after_create :clear_course_events
|
||||
}
|
||||
end
|
||||
def clear_course_events
|
||||
Rails.cache.delete("course_events_#{self.act.course_id}".to_sym) if Rails.env.production? && Setting.course_cahce_enabled?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in new issue