only calculate md5 if cache exists