Changed persistencesystem so that it now uses the cache for connections