Made the Cache system a little more generic.