fixed cache with migrations and tests