Displaying 1 result from an estimated 1 matches for "expire_index".
2006 Jan 25
1
cache_sweeper causes undefined method error
...eeper isn''t getting loaded correctly - do I have its
file and class names correct? I don''t see anything in the log related to
the sweeper.
Here''s the sweeper class:
class ItemSweeper < ActionController::Caching::Sweeper
observe Item
def after_create(item)
expire_index item
end
def after_destroy(item)
expire_index item
end
def after_update(item)
expire_index item
end
private
def expire_index(item)
expire_fragment "#index_new_items_type#{item.type_id}"
end
end
thanks for any help!
csn
--
Posted via http://www.ruby-foru...