Cache deterministic seed

Backwards compatible.
minor: Comments in this file are using the // form.