Hey there! any question in your mind? Ask It Now!.

Popular Categories





Cake PHP : Trying to do element caching

+2 votes
103 views
asked in Programming by krish Expert (6,310 points)
edited by Bhartesh

I am Trying to do element caching in cake php this is my code , can you tell me

whats wrong here, When i refreshed page no caching was done.

 

echo $this->element('categorytree', array( 'cache' => array( 'key'=>'categorytree-cache','time' => '+1 hour' ) ))


Thanks for you answer in advance.

1 Answer

0 votes
answered by amit_pammu Expert (5,030 points)
edited by amit_pammu
$this->element('categorytree', array(), array(
        "cache" => array('key' => 'categorytree-cache')
    )
);
try this..!> may be it works!

 

Related Questions

+6 votes
2 answers 1,560 views
+3 votes
3 answers 2,476 views
+4 votes
1 answer 931 views
+6 votes
1 answer 242 views
+2 votes
1 answer 143 views
+1 vote
1 answer 66 views
asked in Programming by Brinz
+1 vote
1 answer 186 views
+4 votes
5 answers 725 views
0 votes
1 answer 9,850 views

Not a Member yet?

Ask to Folks Login

My Account
753 Folks are online
17 members and 736 guest online
Your feedback is highly appreciated