hi Tane,

Thanks for informing me about that. I didn't know that...
Cache although seems simple with CakePHP, there is no good tutorial
that covers all this points in one place.

I am struggling to use get caching machanism work properly..

Regards,
bingo

On Apr 5, 1:56 pm, "digital spaghetti"
<[EMAIL PROTECTED]> wrote:
> I only found out this method today, but found it to work perfectly.
>
> Put the code you wish to cache in an element, and when you want to
> render the element use this:
>
> <?php e($this->element('element', array('cache'=>'1 day'));?>
>
> Now the element will be cached for 24 hours from generation. Beware
> though, if you update the data it uses you need to make sure you
> unlink the cache file on afterSave
>
> In your model file:
>
> function afterSave()
> {
>    @unlink(CACHE.'view'.'element__elementname');
>
> }
>
> (Please check this though, I'm writing this from memory on my blackberry!!)
>
> Tane
>
> On 4/5/07, bingo <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
> > I don't have much traffic on my website...but for future, I am
> > starting to implement cache.
>
> > Its seems to be working...but how do I verify that its properly
> > working...
>
> > For instance, I set cacheAction only for one action in one controller.
> > But when I check my tmp/cahce, I only found cache for model and that
> > too for all the tables. There was no cache folder for view.. Am I
> > missing something.
>
> > Is there any way to check what queries where sent by cakephp before it
> > rendered the view. I tried setting debug to 3 and it seems it sending
> > all
>
> > Regards,
> > bingo- Hide quoted text -
>
> - Show quoted text -


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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