Yoast\WP\SEO\Expiring_Store\Application

Expiring_Store::persist_if_absent │ public │ Yoast 1.0

Persists a value scoped to the current blog, only if the key does not already exist.

Метод класса: Expiring_Store{}

Хуков нет.

Возвращает

bool. True if the value was inserted, false if the key already exists.

Использование

$Expiring_Store = new Expiring_Store();
$Expiring_Store->persist_if_absent( $key, $value, $ttl_in_seconds ): bool;
$key(строка) (обязательный)
The key.
$value(scalar|array<string|int|float|true|false|массив|null>|JsonSerializable) (обязательный)
The value to store.
$ttl_in_seconds(int) (обязательный)
The time-to-live in seconds.

Код Expiring_Store::persist_if_absent() Yoast 28.9

public function persist_if_absent( string $key, $value, int $ttl_in_seconds ): bool {
	return $this->do_persist_if_absent( $this->prefix_for_blog( $key ), $value, $ttl_in_seconds );
}