code cleaning, fixed factory type bug

Cache engine factory now accepts any generic type