1
0
Fork 0
forked from OpenNeo/impress
impress/app/models/item_observer.rb
Matchu db74dd1e29 Remove as_json item caching
Again I'm just not convinced of the perf on this, and it enables us to delete some whole infra over it, we can improve it another time if it's useful to!
2023-10-23 19:05:04 -07:00

9 lines
217 B
Ruby

class ItemObserver < ActionController::Caching::Sweeper
def after_create(item)
Resque.enqueue(Item::CreateTask, item.id)
end
def after_destroy(item)
Resque.enqueue(Item::DestroyTask, item.id)
end
end