first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace WPML\TM\ATE\API\CacheStorage;
use WPML\LIB\WP\Transient as WPTransient;
class Transient implements Storage {
/**
* @param string $key
* @param mixed $default
*
* @return mixed
*/
public function get( $key, $default = null ) {
return WPTransient::getOr( $key, $default );
}
/**
* @param string $key
* @param mixed $value
*/
public function save( $key, $value ) {
WPTransient::set( $key, $value, 3600 * 24 );
}
/**
* @param string $key
*/
public function delete( $key ) {
WPTransient::delete( $key );
}
}