MachineCache class, and a smart_hash function