

def install_cache(cache_name='cache', backend=None, expire_after=None, allowable_codes=(200,), allowable_methods=('GET',), session_factory=CachedSession, **backend_options):
    '\n    Installs cache for all ``Requests`` requests by monkey-patching ``Session``\n\n    Parameters are the same as in :class:`CachedSession`. Additional parameters:\n\n    :param session_factory: Session factory. It must be class which inherits :class:`CachedSession` (default)\n    '
    if backend:
        backend = backends.create_backend(backend, cache_name, backend_options)

    class _ConfiguredCachedSession(session_factory):

        def __init__(self):
            super(_ConfiguredCachedSession, self).__init__(cache_name=cache_name, backend=backend, expire_after=expire_after, allowable_codes=allowable_codes, allowable_methods=allowable_methods, **backend_options)
    _patch_session_factory(_ConfiguredCachedSession)

dataset/ETHPy150Open reclosedev/requests-cache/requests_cache/core.py install_cache/original