Yoast\WP\SEO\Expiring_Store\Application
Expiring_Store::do_persist
Persists a value with the given prefixed key.
Метод класса: Expiring_Store{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->do_persist( $prefixed_key, $value, $ttl_in_seconds ): void;
- $prefixed_key(строка) (обязательный)
- The prefixed key.
- $value(строка|int|float|true|false|array<string|int|float|true|false|массив|null>|JsonSerializable) (обязательный)
- The value to store.
- $ttl_in_seconds(int) (обязательный)
- The time-to-live in seconds.
Код Expiring_Store::do_persist() Expiring Store::do persist Yoast 27.7
private function do_persist( string $prefixed_key, $value, int $ttl_in_seconds ): void {
$json = $this->json_encode_value( $value );
$exp = \gmdate( 'Y-m-d H:i:s', ( $this->date_helper->current_time() + $ttl_in_seconds ) );
$this->repository->upsert( $prefixed_key, $json, $exp );
}