Adds cache invalidation on class.update_counters