Automattic\WooCommerce\StoreApi\Utilities
RateLimits::set_cache()
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() RateLimits::set cache code WC 9.5.1
protected static function set_cache( $action_id, $current_limit ) { return wp_cache_set( self::get_cache_key( $action_id ), $current_limit, self::CACHE_GROUP ); }