I'm trying to cache a python method's output, so for the cache key I'm using hash(method) + the serialized args. I'm using a single memcached server for multiple worker machines.
The problem is, hash(method) has proven inconsistent across these worker machines and processes.
class Foo(object):
def bar():
pass
x = Foo()
hash(x.bar) #was inconsistent across machines/processes
id() won't work because that's a memory location and thus works on only one machine.
Thanks!