Magento "tmp" 文件夹 - 什么时候 cleared/erased?

Magento "tmp" folder - when is it cleared/erased?

tmp 文件夹多久被 Magento 删除或清除一次?或者我可以擦除哪个 events/triggers 该文件夹的内容?

Magento 版本: 1.9.0.1

到目前为止,我注意到大多数使用 tmp 文件夹的模块都有自己的逻辑来删除与模块相关的文件(在 tmp 中创建)。

@codedge 在评论中的问题引导我朝着正确的方向进一步理解和研究我自己的问题。

tmp 文件夹将位于 var 文件夹下,Magento 很可能在某个时候将其删除。

引自Alan Storm's website

Mage::getBaseDir(‘tmp’);

The tmp dir is a temporary directory for safely outputting files into for immediate processing. The operating assumption of the tmp folder is that any developer can write to it and expect their file to stay around for a few minutes, without any expectation that it will be there tomorrow.

/var/tmp

Difference between Flush Cache and Fluch Cache Storage

上面link中的答案提到了以下内容:

Sometimes the cache location (like "/tmp/") or service (like Memcache) is shared with other applications. "Flush Magento Cache" removes only those entries that Magento reliably tracks as it's own. "Flush Cache Storage" clears everything but might affect other applications if they're using it.

(根据我的研究)这一事实得到支持,因为大多数使用 tmp path/directory 的 Magento 模块都有自己的逻辑,可以在不再需要时从文件夹中删除内容.