Add some tests on cache invalidation. Fix offline models and collections
fix update collection cache on delete