2017 © Pedro Peláez
 

cakephp-plugin find-in-file-cache

File Cache plugin for CakePHP

image

m-shimao/find-in-file-cache

File Cache plugin for CakePHP

  • Tuesday, January 31, 2017
  • by m-shimao
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

The plugin handling file cache in find for CakePHP

What is it for?

It is model behavior for static models. If you want to use file cache for static model, this plugin is easy to use., (*1)

Installation

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();

Usage

Table

<?php
class CategoriesTable extends Table
{
    public function initialize(array $config)
    {
        $this->addBehavior('FindInFileCache.FindInFileCache');
    }
}

Config

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>
        ],
        ...
    ],
...
];

The Versions

31/01 2017

dev-master

9999999-dev

File Cache plugin for CakePHP

  Sources   Download

MIT

The Requires

 

The Development Requires