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

Popular Categories





Cake PHP : Trying to do element caching

+2 votes
122 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,634 views
+3 votes
3 answers 2,597 views
+4 votes
1 answer 1,000 views
+6 votes
1 answer 254 views
+2 votes
1 answer 150 views
+1 vote
1 answer 198 views
+4 votes
5 answers 756 views
0 votes
1 answer 9,886 views
+2 votes
3 answers 303 views
asked in Programming by jatin Expert (3,823 points)

Not a Member yet?

Ask to Folks Login

My Account
549 Folks are online
0 members and 549 guest online
Your feedback is highly appreciated