Automattic\WooCommerce\StoreApi\Utilities

RateLimits::set_cache()protected staticWC 1.0

Cache a rate limit.

Method of the class: RateLimits{}

No Hooks.

Return

true|false.

Usage

$result = RateLimits::set_cache( $action_id, $current_limit );
$action_id(string) (required)
Identifier of the action.
$current_limit(object) (required)
Current limit object with expiry and retries remaining.

RateLimits::set_cache() code WC 8.7.0

protected static function set_cache( $action_id, $current_limit ) {
	return wp_cache_set( self::get_cache_key( $action_id ), $current_limit, self::CACHE_GROUP );
}