dev-master
9999999-devFile Cache plugin for CakePHP
MIT
The Requires
- php >=5.5
- cakephp/cakephp ~3.3
The Development Requires
File Cache plugin for CakePHP
It is model behavior for static models. If you want to use file cache for static model, this plugin is easy to use., (*1)
You can install this plugin into your CakePHP application using composer. The recommended way to install composer packages is:, (*2)
composer require m-shimao/find-in-file-cache dev-master
Also don't forget to load the plugin in your bootstrap:, (*3)
Plugin::load('FindInFileCache'); // or Plugin::loadAll();
<?php class CategoriesTable extends Table { public function initialize(array $config) { $this->addBehavior('FindInFileCache.FindInFileCache'); } }
Default Setting is below., (*4)
'className' => 'File',↲ 'prefix' => 'myapp_cake_static_record_',↲ 'path' => CACHE . 'static_records/',↲ 'duration' => '+15 minutes',↲ 'mask' => 0666,↲
If you use original setting, please edit cache section in app.php., (*5)
<?php return [ ... 'Cache' => [ ... 'find-in-file' => [ 'className' => 'File',↲ <type your setting> ], ... ], ... ];
File Cache plugin for CakePHP
MIT