This class will be really useful for a feature that is soon to be added. Also moved some commonly used bits from EntityCache over to its own file.