WordPress at a glance
function is not described


Plugins_Handler::cache_plugins() public WC 1.0

Saves the plugin list to the cache.

{} It's a method of the class: Plugins_Handler{}

No Hooks.


null. Nothing.


$Plugins_Handler = new Plugins_Handler();
$Plugins_Handler->cache_plugins( $plugins );
$plugins(array) (required)
The plugin list to save to the cache.

Code of Plugins_Handler::cache_plugins() WC 5.2.2

public function cache_plugins( $plugins ) {
	// We store the paths in a tokenized form so that that webservers with different absolute paths don't break.
	$plugins = array_map( array( $this->path_processor, 'tokenize_path_constants' ), $plugins );

	set_transient( self::TRANSIENT_KEY, $plugins );