view cache engine problem

View: New views
3 Messages — Rating Filter:   Alert me  

view cache engine problem

by gbk * :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


hi,

i'm using the 1.2 rc2 version of cakephp framework.

if i use view cache with the file engine the file is correctly
generated into the tmp/cache/views folder.

i want to switch to memcache, so i've chanced my core.php:

Cache::config('default', array('engine' => 'Memcache'));

my problem is that the framework still uses the file engine. if i
delete the cache file it will be generated after the first request
again.

another strange behaviour is when i get a cached page it throws the
following exceptions:

Notice (8): Undefined property:  stdClass::$model [CORE_1.2.0.7296-rc2/
cake/libs/view/helper.php, line 328]
Notice (8): Undefined property:  stdClass::$association
[CORE_1.2.0.7296-rc2/cake/libs/view/helper.php, line 361]
Notice (8): Undefined property:  stdClass::$field [CORE_1.2.0.7296-rc2/
cake/libs/view/helper.php, line 361]
Notice (8): Trying to get property of non-object [CORE_1.2.0.7296-rc2/
cake/libs/view/helpers/form.php, line 179

gbk
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: view cache engine problem

by Gwoo-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


View caching is only supported with files. You can use other engines
for the core, model, and custom caching, but view caching always needs
to create files. This is due to the way files are rendered and
included where other caching mechanisms would require different
approach. For now, we have chosen to leave view caching as is.

Now the question of why your Model is not found is a different story.
I would have to see more code for that.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: view cache engine problem

by gbk * :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


hi,

thank you for your answer.
i made some additional tests and if i use RC1 the view cache works
well, but with RC2 i've got the errors mentioned before.

as i see from the call stack the problem is in the searchbox.ctp.

FormHelper->create( ) ../searchbox.ctp:2
FormHelper->hidden( ) ../form.php:202
Helper->__initInputField( ) ../form.php:948
Helper->setEntity( ) ../helper.php:612

this is the line in the searchbox.ctp:

<?php echo $form->create('Search', array('controller'=>'search',
'action'=>'index')); ?>

this is the related model:

<?php
class Search extends AppModel {
        var $name = 'Search';
        var $useTable = false;

}?>

fragment from my layout:

<div id="header">
        <cake:nocache>
                <?=$this->element('searches/searchbox')?>
                <?=$this->element('menu/topmenu')?>
        </cake:nocache>
</div>

if you need some more code or any debug information, please answer the
post.

thanks,

gbk


On júl. 8, 16:47, Gwoo <gwoo.cake...@...> wrote:
> View caching is only supported with files. You can use other engines
> for the core, model, and custom caching, but view caching always needs
> to create files. This is due to the way files are rendered and
> included where other caching mechanisms would require different
> approach. For now, we have chosen to leave view caching as is.
>
> Now the question of why your Model is not found is a different story.
> I would have to see more code for that.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---