WP_CLI
FileCache::export()
Copy a file out of the cache
Метод класса: FileCache{}
Хуков нет.
Возвращает
true|false
.
Использование
$FileCache = new FileCache(); $FileCache->export( $key, $target, $ttl );
- $key(строка) (обязательный)
- cache key
- $target(строка) (обязательный)
- target filename
- $ttl(int)
- time to live
По умолчанию: null
Код FileCache::export() FileCache::export WP-CLI 2.8.0-alpha
public function export( $key, $target, $ttl = null ) { $filename = $this->has( $key, $ttl ); if ( $filename && $this->ensure_dir_exists( dirname( $target ) ) ) { return copy( $filename, $target ); } return false; }