More caching tests. Fixed grace mode.

Rather than saint being on/off, it's now configured as a duration, which
specified how long to extend the cache in the case of a failure.