CORE: modified implementation of cache, added class for performance measurement