aiohttp-cache icon indicating copy to clipboard operation
aiohttp-cache copied to clipboard

NO-CACHE support

Open Guibod opened this issue 2 years ago • 1 comments

Could it be possible to provide a dummy cache backend that does nothing ?

I’m in need of a common interface for my client with or without cache (for instance with disabled) so i’ll need to implement my own no cache backend.

Guibod avatar Feb 17 '23 07:02 Guibod

Hey, I don't think this is something that can be used by others, so I see the option only to fork the repo and add the dummy backend there.

In order to add a new backend you have to implement BackendBase and CondifgBase interfaces from https://github.com/cr0hn/aiohttp-cache/blob/master/aiohttp_cache/backends.py . And then refer them in the setup.py similar with this example https://github.com/cr0hn/aiohttp-cache/blob/master/aiohttp_cache/setup.py#L48 .

zhukovgreen avatar Feb 17 '23 11:02 zhukovgreen