Automattic\WooCommerce\Caching

ObjectCache::get_cache_key_prefix()publicWC 1.0

Method of the class: ObjectCache{}

No Hooks.

Return

null. Nothing (null).

Usage

$ObjectCache = new ObjectCache();
$ObjectCache->;

ObjectCache::get_cache_key_prefix() code WC 8.7.0

		$errors = $this->validate( $object );
		if ( ! is_null( $errors ) ) {
			try {
				$id = $this->get_id_from_object_if_null( $object, $id );
			} catch ( \Throwable $ex ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch
				// Nothing else to do, we won't be able to add any significant object id to the CacheException and that's it.
			}

			if ( count( $errors ) === 1 ) {
				throw new CacheException( 'Object validation/serialization failed: ' . $errors[0], $this, $id, $errors );