Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Newbie question: cannot disable caching for the life of me!

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
darisd
Smarty n00b


Joined: 18 Jun 2003
Posts: 4

PostPosted: Wed Jun 18, 2003 6:12 pm    Post subject: Newbie question: cannot disable caching for the life of me! Reply with quote

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
View user's profile Send private message Yahoo Messenger
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 235
Location: Purdue University

PostPosted: Wed Jun 18, 2003 6:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
darisd
Smarty n00b


Joined: 18 Jun 2003
Posts: 4

PostPosted: Wed Jun 18, 2003 6:38 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
idxman01
Smarty Rookie


Joined: 10 Jun 2003
Posts: 14
Location: FL

PostPosted: Wed Jun 18, 2003 6:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
darisd
Smarty n00b


Joined: 18 Jun 2003
Posts: 4

PostPosted: Wed Jun 18, 2003 7:15 pm    Post subject: Reply with quote

I'll give that a go tonite, can't do it here at work my boss is watching me Confused
Back to top
View user's profile Send private message Yahoo Messenger
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Jun 18, 2003 7:51 pm    Post subject: Reply with quote

darisd wrote:
I'll give that a go tonite, can't do it here at work my boss is watching me Confused


That's a good one.
Back to top
View user's profile Send private message
darisd
Smarty n00b


Joined: 18 Jun 2003
Posts: 4

PostPosted: Wed Jun 18, 2003 9:11 pm    Post subject: Reply with quote

That totally worked. I am one step closer to god. Thank you.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP