init cache sets and correctly scans inputs