  Let $K$ be a Gorenstein noetherian ring of finite Krull dimension, and
consider the category of cohomologically noetherian commutative differential
graded rings $A$ over $K$, such that $H^0(A)$ is essentially of finite type
over $K$, and $A$ has finite flat dimension over $K$. We extend Grothendieck's
twisted inverse image pseudofunctor to this category by generalizing the theory
of rigid dualizing complexes to this setup. We prove functoriality results with
respect to cohomologically finite and cohomologically essentially smooth maps,
and prove a perfect base change result for $f^{!}$ in this setting. As
application, we deduce a perfect derived base change result for the twisted
inverse image of a map between ordinary commutative noetherian rings. Our
results generalize and solve some recent conjectures of Yekutieli.
