PhpSpreadsheet中的PHPExcel_Settings :: setCacheStorageMethod替代方案

问题描述 投票:1回答:1

我在之前的代码中有这些行

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

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

我能够找到类\ PhpOffice \ PhpSpreadsheet \ Settings和方法setCache()和getCache()。但仍然无法找到我的选择。

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

phpexcel phpspreadsheet
1个回答
1
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.