Add RetrieveBlockTypes() function with cache