2

我注意到 Magento CE 1.7 使用索引器事件来处理产品保存等事件。这些事件存储在表 index_event 和 index_process_event 中。

现在,我的情况如下。我有一个产品导入脚本,可以直接在数据库中插入 1 到 10.000 个产品。在我的情况下,这比使用 Magento API 非常快而且好得多。

作为一项安全措施,我将所有索引标记为之后需要重新索引。这很好用,但如果您只导入 10 种产品,那就有点矫枉过正了。完整的重新索引将花费很长时间。

基本上我想在导入后将索引器事件排队并使用 cron 异步处理它们,但我不知道这是否可能,特别是因为它需要异步并使用 cron(我不想阻止用户界面)。

I'd first like to understand the steps involved and then go from there to find the best solution.

As a quick-and-dirty solution I thought about creating my own queue table and run $product->save() on each product - but that may also have it's pitfalls.

Update: I found this extension which seams to use a queue as well, but my original question remains. Can this be done on a regular Magento install? http://mirasvit.com/magento-extensions/performance-optimization/magento-asynchronous-cache.html

4

0 回答 0