Added CachedScheduler and test.