(
fn: Callable[..., _R],
self: Dialect,
con: Connection,
*args: Any,
**kw: Any,
)
| 114 | ) -> Callable[[Callable[..., _R]], Callable[..., _R]]: |
| 115 | @util.decorator |
| 116 | def go( |
| 117 | fn: Callable[..., _R], |
| 118 | self: Dialect, |
| 119 | con: Connection, |
| 120 | *args: Any, |
| 121 | **kw: Any, |
| 122 | ) -> _R: |
| 123 | info_cache = kw.get("info_cache", None) |
| 124 | if info_cache is None: |
| 125 | return fn(self, con, *args, **kw) |
| 126 | key = _ad_hoc_cache_key_from_args((fn.__name__,), traverse_args, args) |
| 127 | ret: _R = info_cache.get(key) |
| 128 | if ret is None: |
| 129 | ret = fn(self, con, *args, **kw) |
| 130 | info_cache[key] = ret |
| 131 | return ret |
| 132 | |
| 133 | return go |
| 134 |
no test coverage detected