Changed the item cache to a weak dictionary.