00abe27ef8
Before this commit you have to do some hacks to cache model finds easily. When using custom find methods like `find('foo')` => `_findFoo(...)` it is common for the method to adjust the query params. Trying to cache a query using a hash of the query params : function find($type, $query) { $query = $this->_beforeFind($query); $cacheKey = $type . '_' . md5(selialize($query)); $cache = Cache::read($cachKey, 'my_cache'); if ($cacheKey !== false) { return $cache; } $results = $this->_afterFind($type, $query); Cache::write($cacheKey, $results, 'my_cache'); return $results; } Before this commit you either have to completely overload find and rewrite it in the AppModel or call the before to get the modified `$query` and let cake run the before again. |
||
---|---|---|
app | ||
lib/Cake | ||
plugins | ||
vendors | ||
.editorconfig | ||
.gitignore | ||
.htaccess | ||
.travis.yml | ||
build.properties | ||
build.xml | ||
index.php | ||
README.md |
CakePHP
CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.
Some Handy Links
CakePHP - The rapid development PHP framework
Cookbook - THE Cake user documentation; start learning here!
Plugins - A repository of extensions to the framework
The Bakery - Tips, tutorials and articles
API - A reference to Cake's classes
CakePHP TV - Screen casts from events and video tutorials
The Cake Software Foundation - promoting development related to CakePHP
Get Support!
Our Google Group - community mailing list and forum
#cakephp on irc.freenode.net - Come chat with us, we have cake.
Q & A - Ask questions here, all questions welcome
Lighthouse - Got issues? Please tell us!