added a general-purpose cache