model.metaclass_cache

Metaclass instance cache. Python metaclass which checks arguments passed to constructor and maintains a cache. Passing in the same arguments will return the same object, shared by all callers.

This is especially useful for objects with expensive methods which are decorated @lru_cache, like TAM.py. Sharing a single object means when any of them have warmed the cache, all solutions benefit.

class MetaclassCache(builtins.type):

type(object) -> the object's type type(name, bases, dict, **kwds) -> a new type

def hash_item(self, item):