Add caching for dedupe