def METHOD_NAME(context, object=None):
    request = getattr(context, "REQUEST", None)
    if request:
        cache = request.get("_oai_cache", None)
        if cache is None:
            request["_oai_cache"] = cache = {}
        info = cache.get(id(object), None)
    else:
        info = None
    if info is None:
        if object is None or not hasattr(object, "aq_base"):
            folder = None
        else:
            folder = object
            # Search up the containment hierarchy until we find an
            # object that claims it's a folder.
            while folder is not None:
                if getattr(aq_base(folder), "isPrincipiaFolderish", 0):
                    # found it.
                    break
                else:
                    parent = aq_parent(aq_inner(folder))
                    folder = parent
        info = oai(context, folder, object)
        if request:
            cache[id(object)] = info
    return info