|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
darisd Smarty n00b
Joined: 18 Jun 2003 Posts: 4
|
Posted: Wed Jun 18, 2003 6:12 pm Post subject: Newbie question: cannot disable caching for the life of me! |
|
|
Maybe i am doing something stupid. But I cannot for the life of me disable caching. I have a lot of dynamic content... i am sure you are all familiar. The only way around this for me is to delete the entire contents of the templates_c folder, which is a pain in my backside when all i want to change is the color of a table.
Perhaps there is a semantic issue here: is there a difference between caching and compiling?
Here is the code that continuously regenerates a cache:
<?
$objSmarty = new Smarty;
$objSmarty->compile_check = $this->bitCompileCheck;
$objSmarty->debugging = $this->bitDebug;
$objSmarty->caching = false; // this should do it right?
$objSmarty->assign("array", $array);
$objSmarty->display('adminpage.tpl');
?>
Other parameters I have checked in "Smarty.php":
-$compile_check, both true and false, no effect
-$force_compile, both true and false, no effect
-$cache_lifetime set to 0, no effect at all
-$cache_modified_check, true and false, still no effect
If anyone has any ideas at all I would be forever in your debt, thanks. |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Wed Jun 18, 2003 6:24 pm Post subject: |
|
|
There is a difference between caching and compiling a template must be compiled. Cacheing is what is finally displayed to the browser thrown in a text file in the $smarty->cache_dir directory. Compiling is normal just change the template and it will recompile. _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
darisd Smarty n00b
Joined: 18 Jun 2003 Posts: 4
|
Posted: Wed Jun 18, 2003 6:38 pm Post subject: |
|
|
Thanks, but unfortunately this is what is not happening! What if the file changes and it does not recompile? Is there a setting that I can set at runtime or in Smarty.class.php? |
|
Back to top |
|
idxman01 Smarty Rookie
Joined: 10 Jun 2003 Posts: 14 Location: FL
|
Posted: Wed Jun 18, 2003 6:53 pm Post subject: |
|
|
Code: | $objSmarty->compile_check = $this->bitCompileCheck;
//maybe try: $objSmarty->compile_check = TRUE;
// just to see if your bitCompileCheck var is the culprit
|
I know you said you've tried both true and false, but setting it to true should be what you're looking for.
Clear our templates_c, set compile_check to true, view the page so the template compiles, then change the template. It should automatically re-compile it for you on the next view. |
|
Back to top |
|
darisd Smarty n00b
Joined: 18 Jun 2003 Posts: 4
|
Posted: Wed Jun 18, 2003 7:15 pm Post subject: |
|
|
I'll give that a go tonite, can't do it here at work my boss is watching me |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Jun 18, 2003 7:51 pm Post subject: |
|
|
darisd wrote: | I'll give that a go tonite, can't do it here at work my boss is watching me |
That's a good one. |
|
Back to top |
|
darisd Smarty n00b
Joined: 18 Jun 2003 Posts: 4
|
Posted: Wed Jun 18, 2003 9:11 pm Post subject: |
|
|
That totally worked. I am one step closer to god. Thank you. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|