Browse Source

Add meta data cache doc for ORM split.

dereuromark 8 years ago
parent
commit
8122291d45
1 changed files with 16 additions and 0 deletions
  1. 16 0
      src/ORM/README.md

+ 16 - 0
src/ORM/README.md

@@ -115,6 +115,22 @@ $article = $articles->get(2);
 $articles->delete($article);
 ```
 
+## Meta Data Cache
+
+It is recommended to enable meta data cache for production systems to avoid performance issues.
+For e.g. file system strategy your bootstrap file could look like this:
+```php
+use Cake\Cache\Engine\FileEngine;
+
+$cacheConfig = [
+   'className' => FileEngine::class,
+   'duration' => '+1 year',
+   'serialize' => true,
+   'prefix'    => 'orm_',
+],
+Cache::setConfig('_cake_model_', $cacheConfig);
+```
+
 ## Additional Documentation
 
 Consult [the CakePHP ORM documentation](https://book.cakephp.org/3.0/en/orm.html)