Fixed cache expiry detection error and updated example