A weakref cache for arbitrary objects via an arbitrary function.
Many objects have a names argument. This function formats it, i.e., if it is a list it turns it into a tuple, and if it is a string and the number of names needed is bigger than 1, it makes each letter of the string an element of a tuple.
Returns true if cache has object defined by the given args.
Return the key associated to the given args. Note that the values must be hashable.