1
0
Fork 0
forked from OpenNeo/impress
impress/app/models/item_observer.rb
Matchu 3ea22e6977 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-08-02 11:41:19 -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