Skip to main content

cache.in_memory_cache

InMemoryCache

class InMemoryCache(AbstractCache)

__enter__

def __enter__() -> Self

Enter the runtime context related to the object.

Returns:

  • self - The instance itself.

__exit__

def __exit__(exc_type: Optional[Type[BaseException]],
exc_val: Optional[BaseException],
exc_tb: Optional[TracebackType]) -> None

Exit the runtime context related to the object.

Arguments:

  • exc_type - The exception type if an exception was raised in the context.
  • exc_value - The exception value if an exception was raised in the context.
  • traceback - The traceback if an exception was raised in the context.