updated cache task with better hashing