kernel.core.message_cache — IPython 0.10.2 documentation

### Navigation

- index
- modules |
- next |
- previous |
- IPython 0.10.2 documentation »
- The IPython API »

# kernel.core.message_cache

## Module: `kernel.core.message_cache`

Inheritance diagram for `IPython.kernel.core.message_cache`:

Storage for the responses from the interpreter.

## Classes

### `IMessageCache`

class `IPython.kernel.core.message_cache.` `IMessageCache`

  Bases: `object`

  Storage for the response from the interpreter.

  `__init__`()

    x.__init__(...) initializes x; see x.__class__.__doc__ for signature

  `add_message`()

    Add a message dictionary to the cache.

    Parameters : | i : int message : dict

  `get_message`()

    Get the message from the cache.

    Parameters : | i : int, optional The number of the message. If not provided, return the highest-numbered message.
    Returns : | message : dict
    Raises : | IndexError if the message does not exist in the cache. :

### `SimpleMessageCache`

class `IPython.kernel.core.message_cache.` `SimpleMessageCache`

  Bases: `object`

  Simple dictionary-based, in-memory storage of the responses from the interpreter.

  `__init__`()
  `add_message`()

    Add a message dictionary to the cache.

    Parameters : | i : int message : dict

  `get_message`()

    Get the message from the cache.

    Parameters : | i : int, optional The number of the message. If not provided, return the highest-numbered message.
    Returns : | message : dict
    Raises : | IndexError if the message does not exist in the cache. :

### Navigation

- index
- modules |
- next |
- previous |
- IPython 0.10.2 documentation »
- The IPython API »