Refactored the Cache implementation to abstract more of the functionality to the AbstractCache, now each subclass of AbstractCache only needs to implement an addElement method