1

我以前的代码中有这行

$cacheMethod = PHPExcel_CachedObjectStorageFactory:: cache_to_phpTemp;
$cacheSettings = array( 'memoryCacheSize'  => '32MB');
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);

现在我正在尝试迁移到 PhpSpreadsheet。

我能够找到类 \PhpOffice\PhpSpreadsheet\Settings 和方法 setCache() 和 getCache()。但仍然无法找到我所拥有的这个选项。

任何人都可以提供一种方法或一个例子来做我在 PHPExcel 中所做的事情到 PhpSpreadsheet 中。

4

1 回答 1

1

在 PhpSpreadsheet 中重写了缓存(请参阅文档)。如果您需要其他缓存选项,则必须编写自己的 PSR-16 缓存或使用文档中提到的库之一。

于 2017-12-13T12:17:23.897 回答