- <?php
- //MODEL
- //normal stuff up here
- function getSources(){
- if( ($data = Cache::read( 'sources' )) === false ){
- $data = $this->find('list');
- Cache::write('sources', $data);
- }
- return $data;
- }
- function afterSave(){
- Cache::clear();
- }
- function afterDelete(){
- Cache::clear();
- }