equals and getCache for data and cache