dpd20130 2012-04-15 04:14
浏览 87
已采纳

Zend Framework缓存存储位置

I'm using Zend Framework and Zend_Cache with the File backend.

According to the ZF manual the recommended place to store the cache files would be under /data/cache but I'm thinking it would make more sense to store them under /temp/cache. Why is /data/cache preferred?

Here is a link to the part of ZF manual I mentioned: http://framework.zend.com/manual/en/project-structure.project.html

  • 写回答

2条回答 默认 最新

  • douche3791 2012-04-15 11:23
    关注

    I guess you're talking about these recommendations: Recommended Project Directory Structure.

    The interesting parts are:

    data/: This directory provides a place to store application data that is volatile and possibly temporary. The disturbance of data in this directory might cause the application to fail. Also, the information in this directory may or may not be committed to a subversion repository. Examples of things in this directory are session files, cache files, sqlite databases, logs and indexes.


    temp/: The temp/ folder is set aside for transient application data. This information would not typically be committed to the applications svn repository. If data under the temp/ directory were deleted, the application should be able to continue running with a possible decrease in performance until data is once again restored or recached.

    Now, you can understand that Zend doesn't recommend to store your Zend_Cache data into data/cache/ only, but it could also be stored under the temp/ directory. The real question is: should I commit these data cache files and are they necessary for the application to run correctly? Once you answered these questions, you know where you should put your cache files. In my opinion, in most cases cached data should be stored under the temp/ directory.

    Finally, remember that this is only a recommendation, you are always free to do the way you want.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办