Some comments for CacheTypes and small refactoring.