Added an additional check for existing cache item

For some reason the changes to the ExpiresAt function have a knock on affect, and cause an error here. I have added an extra check as the StructKeyExists doesn't seem to work. This seems to work for me, but may need adjusting.