diff --git a/collects/redex/private/reduction-semantics.rkt b/collects/redex/private/reduction-semantics.rkt index cef9780a27..4556b3f416 100644 --- a/collects/redex/private/reduction-semantics.rkt +++ b/collects/redex/private/reduction-semantics.rkt @@ -1666,7 +1666,8 @@ (memq name (current-traced-metafunctions))) (parameterize ([current-trace-print-args (λ (name args kws kw-args level) - (if (eq? not-in-cache (hash-ref cache exp not-in-cache)) + (if (or (not (caching-enabled?)) + (eq? not-in-cache (hash-ref cache exp not-in-cache))) (display " ") (display "c")) (ot name (car args) kws kw-args level))] diff --git a/collects/redex/tests/tl-test.rkt b/collects/redex/tests/tl-test.rkt index 439affdfa0..a2eceb5169 100644 --- a/collects/redex/tests/tl-test.rkt +++ b/collects/redex/tests/tl-test.rkt @@ -784,6 +784,14 @@ (term (f 1))) (test (get-output-string sp) "c>(f 1)\n <0\n")) + (let ([sp (open-output-string)]) + (parameterize ([current-output-port sp] + [current-traced-metafunctions 'all] + [print-as-expression #f] + [caching-enabled? #f]) + (term (f 1))) + (test (get-output-string sp) " >(f 1)\n > (f 0)\n < 0\n <0\n")) + (let ([sp (open-output-string)]) (parameterize ([current-output-port sp] [current-traced-metafunctions '(f)]