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

problème configuration du cache

 
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 -> Language: French
View previous topic :: View next topic  
Author Message
shepR
Smarty n00b


Joined: 25 May 2004
Posts: 4

PostPosted: Wed Jun 16, 2004 8:51 am    Post subject: problème configuration du cache Reply with quote

bonjour tout le monde
j'ai un problème avec la configuration du cache dans smarty.
Voici ma classe smarty :

-----setup.php----
<?
// charge la librairie Smarty
require('Smarty.class.php');

// le fichier setup.php est un bon
// endroit pour charger les fichiers
// de librairies de l'application et vous pouvez
// faire cela juste ici. Par exemple :
// require('livredor/livredor.lib.php');

class Smarty_CCPB extends Smarty {

function Smarty_CCPB() {

// Constructeur de la classe. Appelé automatiquement
// à l'instanciation de la classe.

$this->Smarty();

$this->template_dir = '../content/templates/';
$this->compile_dir = '../content/templates_c/';
$this->config_dir = '../content/configs/';
$this->cache_dir = '../content/cache/';

$this->caching=0;
}

}
?>

pourtant dans internet explorer je suis obligé de faire F5 pour actualiser la page car il me sort une qui est enregistrée.
Aidez moi svp pour une bonne configuration du cache.

Merci
_________________
shepR Wink
Back to top
View user's profile Send private message Send e-mail
jyl
Smarty Rookie


Joined: 10 Jul 2004
Posts: 5
Location: 74 (haute-savoie FRANCE)

PostPosted: Sat Jul 10, 2004 10:47 am    Post subject: pb de cache Reply with quote

Bjr,

Ton message est un peu ancien et je sais pas si depuis tu as eu une réponse ou tu as trouvé, mais je te file mon setup.php. Le mien est quasi identique mais n'a pas ta dernière ligne !

Code:
require('/usr/local/lib/php/Smarty/Smarty.class.php');
class Smarty_test extends Smarty {
function Smarty_test() {
$this->Smarty();
$this->template_dir = '/le chemin/templates/';
$this->compile_dir= '/le chemin/templates_c/';
$this->config_dir= '/le chemin/configs/';
$this->cache_dir= '/le chemin/cache/';
$this->plugins_dir= '/le chemin/plugins/';
}
}


et après quand je commence une page php:

Code:
$smarty = new Smarty_test;
$smarty->use_sub_dirs = false;//obligatoire pour moi je sais pas pour les autres ???
$smarty->caching = 2; // true=cache 1 heure -- 2 = param perso
$smarty->cache_lifetime = 86400;// 24 heures par exemple
if(!$smarty->is_cached(lenomdufichier.tpl')) {
......
}
$smarty->display('lenomdufichier.tpl');


@+

JY
Back to top
View user's profile Send private message Visit poster's website
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 -> Language: French 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