add mirrors and fix cache database cursor