Added caching for getMostRecentTimestamp