+function custom_woo_ce_export_phpexcel_caching_methods() {
+ $cacheSettings = array( 'memoryCacheSize ' => '8MB' );
+ $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp;
+ // Cache in memory; gzip
+ // $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_in_memory_gzip;
+ // Cache in memory; serialized
+ // $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_in_memory_serialized;
+ // Cache in memory; discISAM
+ // $cacheMethod = PHPExcel_CachedObjectStorageFactory:: cache_to_discISAM;
+ PHPExcel_Settings::setCacheStorageMethod( $cacheMethod, $cacheSettings );
+add_action( 'woo_ce_export_phpexcel_caching_methods', 'custom_woo_ce_export_phpexcel_caching_methods' );