def METHOD_NAME(self, key, report_type=None, value=None):
    with self.lock:
        if key in self.cache:
            cache_node = self.cache[key]
            if report_type:
                cache_node.content[report_type].add(value)
            else:
                cache_node.content = value
        else:
            if len(self.cache) >= self.capacity:
                self.dump_cache()
            self.create_cache_node(key, report_type, value)