(orm_context)
| 84 | |
| 85 | @event.listens_for(maker, "do_orm_execute", retval=True) |
| 86 | def do_orm_execute(orm_context): |
| 87 | ckey = None |
| 88 | for opt in orm_context.user_defined_options: |
| 89 | ckey = opt.get_cache_key(orm_context) |
| 90 | if ckey: |
| 91 | break |
| 92 | else: |
| 93 | if "cache_key" in orm_context.execution_options: |
| 94 | ckey = orm_context.execution_options["cache_key"] |
| 95 | |
| 96 | if ckey is not None: |
| 97 | return get_value( |
| 98 | ckey, |
| 99 | cache, |
| 100 | orm_context.invoke_statement, |
| 101 | ) |
| 102 | |
| 103 | return maker() |
| 104 |
no test coverage detected