Move artifact cache code to its own dir.