method cache: adapted coding style for method cache