Lps 49135 Decouple cache configuration and ehcache, part1.

Hi Shuyang,

This ticket is a little complicated, I will send you two PR about it, and this is the first one, it contains some preparation work. 


Thanks.
Tina.