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.


Top ↑

Source

File: wp-includes/class-wp-feed-cache-transient.php

	public function touch() {
		return set_transient( $this->mod_name, time(), $this->lifetime );
	}


Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.