Wp transient set (WP-CLI)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
$ wp help transient set


  wp transient set


  Sets a transient value.


  wp transient set <key> <value> [<expiration>] [--network]

  `<expiration>` is the time until expiration, in seconds.

  For a more complete explanation of the transient cache, including the
  network|site cache, please see docs for `wp transient`.


    Key for the transient.

    Value to be set for the transient.

    Time until expiration, in seconds.

    Set the value of a network|site transient. On single site, this is
    is a specially-named cache key. On multisite, this is a global cache
    (instead of local to the site).


    $ wp transient set sample_key "test data" 3600
    Success: Transient added.

See also