I've got this code:

        var $helpers = array('Cache');
        var $cacheAction = array
        (
                'index' => '+1 hour',
                'view' => '+1 hour'
        );

[...]

        function view($id = null) {
                if (!$id) {
                        $this->Session->setFlash(__('Invalid Post.', true));
                        $this->redirect(array('action'=>'index'));
                }
                $this->set('post', $this->Post->read(null, $id));
        }

        function index() {
                $data = $this->Post->findAll();
        $this->set('posts', $data);
        }

Caching for the index works, but the queries for the view action will
always be makde. Why? I've tried changing $cacheAction to view slash
(/) instead, but that didnt do any difference. Fact is, if I did it
for the index, index caching wouldnt work either at all.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to