Allow race-free implementation of the State Caching Proxy Pattern.

Revised based on issues found in CI in pull request #190.
Fixes #187.
7 files changed