def has_perm(self, user_obj, perm, obj=None):
        if perm not in self.get_supported_permissions():
            return False
        # use cache to reduce method call
        CACHE_NAME = '_logical_perms_cache'
        if not hasattr(user_obj, CACHE_NAME):
            setattr(user_obj, CACHE_NAME, {})
        cache = getattr(user_obj, CACHE_NAME)
        cachekey = "%s %s" % (perm, hash(obj))
        if cachekey not in cache:
            cache[cachekey] = self._has_perm(user_obj, perm, obj)
        return cache[cachekey]
Call YAML parser to generate and handle all events.
dataset/ETHPy150Open lambdalisue/django-permission/src/permission/handlers.py/LogicalPermissionHandler.has_perm--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/yaml_listener.py/EventListener.Parse