'Remove any cached permissions for a record. This can be
necessary in methods which change the status of the record
(e.g. approval).
@param table: the table
@param record_id: the record ID'

def forget(self, table=None, record_id=None):

    if (table is None):
        self.permission_cache = {}
        return
    permissions = self.permission_cache
    if (not permissions):
        return
    if hasattr(table, '_tablename'):
        tablename = original_tablename(table)
    else:
        tablename = table
    for key in list(permissions.keys()):
        r = key.split('/')
        if ((len(r) > 1) and (r[(-2)] == tablename)):
            if ((record_id is None) or ((record_id is not None) and (r[(-1)] == str(record_id)))):
                del permissions[key]
