Thomas Kemmer
Thomas Kemmer
Kind of thought about that a long while ago, but didn't know how to deal with transient (e.g. network) related exceptions vs. persistent ones (e.g. this URL does not exist)....
As for decorating decorators, the only thing I'd come up would probably be to cumbersome to use: ``` @raise_cached_exceptions(...) @cached(...) @cache_exceptions(...) def foo(...) ``` where `@cache_exceptions` would catch exceptions and...
Good points! Have to think about it. Don't expect any comments before next weekend (work, life, etc.) ;-)
Anyway, having a `@cached(..., exceptions=(...))` doesn't seem to be that far-fetched any more to me, though ;-)
It's quite embarrassing for me to answer this after more than half a year of inactivity, but somehow this wasn't on my radar... Currently, I have no plans including this...
There is an example for removing individual cache items using `hashkey` in the `@cached` decorator docs: https://cachetools.readthedocs.io/en/stable/#cachetools.cached Maybe I should state explicitly that this work similar for `@cachedmethod`. However, I...
AFAICS this is also quite similar to #176.
@infohash: Are you talking about the `@cached` or the `@cachedmethod` decorator? `@cachedmethod` properties are still considered somewhat "experimental", and are therefore not properly documented yet. For `@cached`, the arguments to...
So, the `token` argument is actually a tuple? Bear in mind that `cache` in `@cachedmethod` is actually a method itself (i.e. needs passing `self`), and the `cache_key` gets passed `self`...
@infohash: Glad you solved it. Yes, documentation should (and eventually, will) be added for this.