Logic added to GenPickler to check cache