Skip to content

Feature request: global patch like in requests-cache?Β #150

@ltalirz

Description

@ltalirz

Feature description

Global cache via monkeypatching, just like in requests-cache

import requests
import requests_cache

requests_cache.install_cache('demo_cache')
requests.get('https://httpbin.org/delay/1')

[Apologies if this is not a sensible feature request; I'm new to aiohttp]

Use case

Cache requests of existing Python package that relies on aiohttp.ClientSession (without modifying the package).

Workarounds

Not that I'm aware of. I tried using requests-cache with the code snippet above, but that did not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions