Merge pull request #711 from metamx/fix-maxtime-caching

Fix maxtime caching