19 lines
377 B
PHP
19 lines
377 B
PHP
<?php
|
|||
|
|
declare( strict_types=1 );
|
||
|
|
|
||
|
|
namespace StreamGoals\PayPal;
|
||
|
|
|
||
|
|
final class WpCache implements Cache {
|
||
|
|
|
||
|
|
public function get( string $key ): mixed {
|
||
|
|
return get_transient( $key );
|
||
|
|
}
|
||
|
|
|
||
|
|
public function set( string $key, mixed $value, int $ttl ): void {
|
||
|
|
set_transient( $key, $value, $ttl );
|
||
|
|
}
|
||
|
|
|
||
|
|
public function delete( string $key ): void {
|
||
|
|
delete_transient( $key );
|
||
|
|
}
|
||
|
|
}
|