'Used internally by the accessor properties.'

def _set_cache_value(self, key, value, type):

    if (type is bool):
        if value:
            self[key] = None
        else:
            self.pop(key, None)
    elif (value is None):
        self.pop(key)
    elif (value is True):
        self[key] = None
    else:
        self[key] = value
