def clear_main_mod_cache(self):
    "Clear the cache of main modules.\n\n        Mainly for use by utilities like %reset.\n\n        Examples\n        --------\n        In [15]: import IPython\n\n        In [16]: m = _ip.new_main_mod(IPython.__file__, 'IPython')\n\n        In [17]: len(_ip._main_mod_cache) > 0\n        Out[17]: True\n\n        In [18]: _ip.clear_main_mod_cache()\n\n        In [19]: len(_ip._main_mod_cache) == 0\n        Out[19]: True\n        "
    self._main_mod_cache.clear()
Clear the cache of main modules.

Mainly for use by utilities like %reset.

Examples
--------
In [15]: import IPython

In [16]: m = _ip.new_main_mod(IPython.__file__, 'IPython')

In [17]: len(_ip._main_mod_cache) > 0
Out[17]: True

In [18]: _ip.clear_main_mod_cache()

In [19]: len(_ip._main_mod_cache) == 0
Out[19]: True
def clear_main_mod_cache(self):
    "Clear the cache of main modules.\n\n        Mainly for use by utilities like %reset.\n\n        Examples\n        --------\n        In [15]: import IPython\n\n        In [16]: m = _ip.new_main_mod(IPython.__file__, 'IPython')\n\n        In [17]: len(_ip._main_mod_cache) > 0\n        Out[17]: True\n\n        In [18]: _ip.clear_main_mod_cache()\n\n        In [19]: len(_ip._main_mod_cache) == 0\n        Out[19]: True\n        "
    self._main_mod_cache.clear()