Added private method
Moved $cache initialization to __constructor