tags:

views:

96

answers:

1

Hi,

I want to disable the cache in the template system Dwoo. Just for my dev mode. But then I tried to invoke setcache () or modify Dwoo classes and nothing works. Someone has an idea? Thank you

A: 

Which cache are you talking about?

Dwoo has a compiled templates cache (by default dwoo/compiled), this is regenerated automatically based on filemtime() and you don't need to take care of it.

Then there is the output cache, by default it's deactivated, so if you have problems with that you should handle it in your application logic, and force the cacheLength to 0 in development mode.

Seldaek
Hi Seldaek ! Thanks so much for your answer.Ok, I was talking about compiled templates. In my dev, I'd like to change my templates without having to empy the dwoo/compiled directory.But, as you said, it seems to be the wrong way :)Ok I tried different way to set the cacheLength to 0. I try " new Dwoo_Template_File("file.tpl", 0); ", but it doesn't work for me. I am totaly wrong, or is there a way to handle it ?
Shmurtzy
Could you explain your problem exactly? Why do you think you need to clear the compiled templates?
Seldaek
OK. As I'm still the dev phase of my website, I have to modify my templates a lot. And I want to have the result up to date in my firefox when I modify a template. I create my template like this : $template = new Dwoo(); $data['some_stuff']= 'something'; $template->ouput('template.tpl', $data); Again, thanks for taking on your time.
Shmurtzy
If you do this, then Dwoo will refresh the templates itself. If you don't see the changes in your browser, try to disable the Firefox cache with the webdeveloper toolbar, or maybe check your application if it has weird caching stuff, but Dwoo isn't doing this.
Seldaek