refactoring ehcache