caching - cache file model cakePHP -
Cache model file in the app \ tmp \ cache \ Model \
I set the configuration
cache :: configuration ('default', array ('engine' = & gt; 'file', 'duration' => 3600000, 'serialize' = & gt; wrong));
Why the model looks cache in 3s, if> 3s reload this model. (Because my app loading> 4C if I do not cache, then if I refresh the page then it is only loading 1s, but if> 3s is loading> 4s. I'm loading slowly Because the app model in the plug-in)
Why do I set a 3600000 or a '5 minute' period, it still caches & lt; 3s model file
and serial las => false it is still doing serial (I have been checked in the file)
and the error may usually be
< Pre> c: \ xampp \ htdocs \ myapp \ app \ tmp \ cache \ model \ cake_model_default_poll_votes) [function.fopen]: failed to open the stream: invalid argument [core \ cake \ lbs \ file.php, line 154]
Anyone can help me> & lt; (I read a lot of documents, please do not suggest reading the document ...)
Automatic cake Forms caching Model Schema, whatever you set in Cache :: config
, this behavior does not have any effect on this behavior in the debug mode ( configure :: write (' Debug ', & gt; 0)
) The cake refreshes the model schema to allow you to make changes to your database at any time. These changes
The output mode ( Configure :: Write ( 'debug', 0)
) model cache will rarely refresh.
> And BTW, you should read the core.php
documentation:; -P
/ ** * Cake PHP debug level: * * Production mode: * 0: No error messages, errors, or warnings shown Flash message redirect * * Development mode: * 1: Errors and warnings shown, the model cache refreshed, the flash message stopped. * 2: 1, but also with full debug messages and SQL output. * * In the production mode, the flash message redirects after a time interval. * In the development mode, you have to click the flash message to continue. * /
Comments
Post a Comment