Set Transient expiration

  1. The countdown would start as soon as the transient is created or updated.

  2. Running set_transient() on an existing transient value will restart the clock. Per the Codex page on set_transient():

    If a transient exists, this function will update the transient’s expiration time.

  3. According to the Transients API page, the expiration time is the maximum lifetime of a transient value. It may be deleted before the time is up, but it will never return its value after the time is up:

    Transients may expire before the $expiration (Due to External Object Caches, or database upgrades) but will never return their value past $expiration.