According to Ehcache documentation http://www.ehcache.org/documentation/2.7/configuration/data-life.html#30343 elements can stay in the cache after expiration and actually expired element is evicted only when it is accessed or resource constraints are reached. As service desk doesn't set any size constraint for the cache, expired elements are not evicted during reindex, each element accessed only once.
For larger instances this can result in a massive amount of memory being consumed, causing indexing speeds to be slowed/impacted and maybe even fail.
This affects DC only. In Server environment different type of cache is used which behaves differently in this case.
On each node find atlassian-jira/WEB-INF/classes/ehcache.xml file and add size limit for cache named "com.atlassian.servicedesk.internal.sla.customfield.SLACFType.slaValueCache", i.e.:
Restart node after updating ehcache.xml to changes to have effect.
Fix sets default size limit for SLAValue global cache to 2 million elements and adds system property "servicedesk.slavalue.global.cache.size.limit" which can be used to change that limit.
Zero or negative value of this system property means unlimited cache size.