Fixed problem with wrong flush method in the cache implementation.