WP_Feed_Cache_Transient::touch() WordPress Method
The touch() method is a member of the WP_Feed_Cache_Transient class. This class is used to manage feed cache transients. The touch() method updates the timestamp for a given transient. This is useful if you want to ensure that a transient does not expire before it is used. Arguments: $transient - The name of the transient to update. Returns: void
WP_Feed_Cache_Transient::touch() #
Sets mod transient.
Return
(bool) False if value was not set and true if value was set.
Source
File: wp-includes/class-wp-feed-cache-transient.php
public function touch() { return set_transient( $this->mod_name, time(), $this->lifetime ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |