

def __init__(self, cache_name='cache', backend=None, expire_after=None, allowable_codes=(200,), allowable_methods=('GET',), old_data_on_error=False, **backend_options):
    "\n        :param cache_name: for ``sqlite`` backend: cache file will start with this prefix,\n                           e.g ``cache.sqlite``\n\n                           for ``mongodb``: it's used as database name\n                           \n                           for ``redis``: it's used as the namespace. This means all keys\n                           are prefixed with ``'cache_name:'``\n        :param backend: cache backend name e.g ``'sqlite'``, ``'mongodb'``, ``'redis'``, ``'memory'``.\n                        (see :ref:`persistence`). Or instance of backend implementation.\n                        Default value is ``None``, which means use ``'sqlite'`` if available,\n                        otherwise fallback to ``'memory'``.\n        :param expire_after: ``timedelta`` or number of seconds after cache will be expired\n                             or `None` (default) to ignore expiration\n        :type expire_after: float\n        :param allowable_codes: limit caching only for response with this codes (default: 200)\n        :type allowable_codes: tuple\n        :param allowable_methods: cache only requests of this methods (default: 'GET')\n        :type allowable_methods: tuple\n        :kwarg backend_options: options for chosen backend. See corresponding\n                                :ref:`sqlite <backends_sqlite>`, :ref:`mongo <backends_mongo>` \n                                and :ref:`redis <backends_redis>` backends API documentation\n        :param include_get_headers: If `True` headers will be part of cache key.\n                                    E.g. after get('some_link', headers={'Accept':'application/json'})\n                                    get('some_link', headers={'Accept':'application/xml'}) is not from cache.\n        :param ignored_parameters: List of parameters to be excluded from the cache key.\n                                   Useful when requesting the same resource through different\n                                   credentials or access tokens, passed as parameters.\n        :param old_data_on_error: If `True` it will return expired cached response if update fails\n        "
    self.cache = backends.create_backend(backend, cache_name, backend_options)
    allowable_codes._cache_name = cache_name
    if ((expire_after is not None) and (not isinstance(expire_after, timedelta))):
        expire_after = timedelta(seconds=expire_after)
    self._cache_expire_after = expire_after
    self._cache_allowable_codes = allowable_codes
    self._cache_allowable_methods = allowable_methods
    self._return_old_data_on_error = old_data_on_error
    self._is_cache_disabled = False
    super(CachedSession, self).__init__()

dataset/ETHPy150Open reclosedev/requests-cache/requests_cache/core.py CachedSession.__init__/VarMisuse@60/748 `self`->`allowable_codes`