Cakephp tmp目录:缓存和会话文件夹 [英] Cakephp tmp directory: Cache and Session Folders
问题描述
有人可以向我解释这些目录中存储了什么类型的数据?
Can someone please explain to me what kind of data is stored in these directories?
例如,我现在有一个活动会话目录是否为空?
For example, I have an active session (with auth) now but the sessions directory is empty?
缓存文件夹中的文件夹(模型,持久性,视图)中存储的是什么?
What exactly is stored in the folders (models, persistent, views) within the cache folder?
在永久性文件夹中,我有一个文件名为'myapp_cake_core_cake_dev_en-us',如果我打开,我可以看到:
Ex in the persistent folder I have a file called 'myapp_cake_core_cake_dev_en-us' and if I open that I can see:
1363808159
a:1:{s:11:"LC_MESSAGES";a:0:{}}
$ b b
请尽可能具体。
Please be as specific as possible.
推荐答案
我会尽量描述他们的内容所以我可能错过了一些)
I'll try to describe their content (out of my head, so I may have missed some)
app / tmp / logs /
包含CakePHP生成的各种日志文件
Contains various log files generated by CakePHP
app / tmp / sessions /
包含您网站的会话如果Cake用作会话处理程序,如果 php
或数据库
使用会话处理程序,此目录将为空。会话处理程序可以在 app / Config / core.php
配置中配置
Contains the sessions of your website if 'Cake' is used as your session-handler if the php
or database
session-handlers are used, this directory will be empty. The session-handler can be configured in your app/Config/core.php
configuration
app / tmp / cache / models
将包含model-cache; CakePHP将缓存您的数据库表的模式定义,以便在每次使用时不需要从数据库中获取该信息。
Will contain the model-cache; CakePHP will cache schema-definitions of your database tables, so that it's not needed to fetch that information from the database with each use.
app / tmp / cache / persistent
将包含关于类/对象的位置和解析的locale文件的缓存信息。此信息将阻止CakePHP扫描所有目录以查找/加载控制器,辅助程序等。
Will contain cache information about the location of classes/objects and parsed 'locale' files. This information will prevent CakePHP from having to scan all directories to find/load Controllers, Helpers etc.
tmp / Cache目录可能包含其他文件,例如,重新使用查看缓存或其他(自定义)缓存,这是存储这些缓存信息的最可能的位置。
The tmp/Cache directories may contain other files, for example if you're using 'view' caching, or other (custom) caching, this is the most probable location to store those cached information.
缓存目录将仅用于 File
缓存机制。也可以使用其他缓存机制,例如 Apc
或 Memcached
。
The cache directories will only be used for the File
cache mechanism. It's also possible to use other cache mechanisms, for example Apc
or Memcached
. These cache mechanism will keep the cached information inside the memory (RAM) of your server, which is a lot faster.
在CakePHP中阅读有关缓存引擎的信息:
Read about cache engines in CakePHP here:
http://book.cakephp.org/ 2.0 / en / core-libraries / caching.html
这篇关于Cakephp tmp目录:缓存和会话文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!