| 1 |
<?php |
| 2 |
|
| 3 |
namespace Templately\Utils; |
| 4 |
|
| 5 |
use function get_transient; |
| 6 |
use function set_transient; |
| 7 |
|
| 8 |
class Database extends Base { |
| 9 |
|
| 10 |
public static function set_transient( $key, $value, $expiration = DAY_IN_SECONDS ) : bool { |
| 11 |
$key = '_templately_' . trim( $key ); |
| 12 |
return set_transient( $key, $value, $expiration ); |
| 13 |
} |
| 14 |
|
| 15 |
public static function get_transient( $key ){ |
| 16 |
$key = '_templately_' . trim( $key ); |
| 17 |
return get_transient( $key ); |
| 18 |
} |
| 19 |
|
| 20 |
} |