build replication cache