|
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 |
idxman01 Smarty Rookie
Joined: 10 Jun 2003 Posts: 14 Location: FL
|
Posted: Fri Jun 20, 2003 4:14 am Post subject: Wont display cached version |
|
|
...This has to be something simple I'm overlooking or an incompatibility between PHP versions.
I've been testing out Smarty and its caching with some of my programs at work and its great. So I cvsup and go to do some dev at home and it never shows the cached copy. Although if I look at the cached file after each view, I can see that its changing and that all the timestamps are correct. Any ideas?
Work: FreeBSD 4.7-RELEASE, Apache 1.3.27, PHP 4.2.3
Home: FreeBSD 4.4-STABLE, Apache 1.3.27_5, PHP 4.3.2
Smarty 2.5.0
Here's a simple example:
Code: |
<?php
require_once 'Smarty.class.php';
$tpl = new Smarty;
$tpl->template_dir = '.';
$tpl->cache_dir = './cache';
$tpl->compile_dir = './tpl_c';
$tpl->caching = 2;
$tpl->cache_lifetime = 30;
if (! $tpl->is_cached('1.tpl')) {
$tpl->assign('foo', date('M d, Y -- H:i:s'));
}
$tpl->display('1.tpl');
?>
|
-r |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Fri Jun 20, 2003 4:53 am Post subject: |
|
|
does flushing the cache and template_c directories help? |
|
Back to top |
|
idxman01 Smarty Rookie
Joined: 10 Jun 2003 Posts: 14 Location: FL
|
Posted: Fri Jun 20, 2003 5:09 am Post subject: |
|
|
I wish it did help. I've flushed both directories a few dozen times tonight while testing.. Just makes no sense since the same code works at work. (maybe its trying to tell me to keep work at work )
-r |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Fri Jun 20, 2003 11:19 pm Post subject: |
|
|
What errors are you getting? You also flushed your PHP accelerator cache? |
|
Back to top |
|
idxman01 Smarty Rookie
Joined: 10 Jun 2003 Posts: 14 Location: FL
|
Posted: Sun Jun 22, 2003 9:07 pm Post subject: |
|
|
Not using PHPA at home and I'll have to get back to you next week on the errors. (vacation w00t!)
It wont load the debug template and gives weird errors on basic items like a cycle statement...
-r |
|
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
|