  The Cayley-Bacharach property, which has been classically stated as a
property of a finite set of points in an affine or projective space, is
extended to arbitrary 0-dimensional affine algebras over arbitrary base fields.
We present characterizations and explicit algorithms for checking the
Cayley-Bacharach property directly, via the canonical module, and in
combination with the property of being a locally Gorenstein ring. Moreover, we
characterize strict Gorenstein rings by the Cayley-Bacharach property and the
symmetry of their affine Hilbert function, as well as by the strict
Cayley-Bacharach property and the last difference of their affine Hilbert
function.
