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 __init__(
      self,
      in_memory_cache: Optional[InMemoryCache] = None,
      redis_cache: Optional[RedisCache] = None,
  ) -> None:
      super().__init__()
      # If in_memory_cache is not provided, use the default InMemoryCache
      self.in_memory_cache = in_memory_cache or InMemoryCache()
      # If redis_cache is not provided, use the default RedisCache
      self.redis_cache = redis_cache
  
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 1 to create a new DualCache object from inherited base classes: BaseCache with example: obj = DualCache(in_memory_cache, redis_cache)