changed factory cache to work in IE8+