Fix using long at the wrong location

mapConfig.setTimeToLiveSeconds expects int but cacheConfiguration.setTimeToLiveSeconds expects long