Debounce a function based on a hashing function