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条)

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效