Check CacheService registration  before collection stats
Merge pull request #3651 from emrahkocaman/maintenance-3.x

Check CacheService registration  before collecting stats