Vertex caching refactored.