class_docstr: This updates both Redis and an in-memory cache simultaneously.
  When data is updated or inserted, it is written to both the in-memory cache + Redis.
  This ensures that even if Redis hasn't been updated yet, the in-memory cache reflects the most recent data.
code: def set_cache(self, key, value, local_only: bool = False, **kwargs):
      # Update both Redis and in-memory cache
      try:
          print_verbose(f"set cache: key: {key}; value: {value}")
          if self.in_memory_cache is not None:
              self.in_memory_cache.set_cache(key, value, **kwargs)
  
          if self.redis_cache is not None and local_only == False:
              self.redis_cache.set_cache(key, value, **kwargs)
      except Exception as e:
          print_verbose(e)
  
imports: import litellm
  import time, logging
  import json, traceback, ast, hashlib
  from typing import Optional, Literal, List, Union, Any
  from openai._models import BaseModel
label_desc: Use image node_id 2 for calling the DualCache obj's underlying member method code with example usage: obj.set_cache(key, value, local_only) without return types