Fixing a race condition between redis and postgres when we try to REFRESH