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

[Résolu]Aide sur isCached par rapport à un timestamp

 
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
roger
Smarty Rookie


Joined: 23 Jan 2011
Posts: 19

PostPosted: Sun Jan 23, 2011 9:58 am    Post subject: [Résolu]Aide sur isCached par rapport à un timestamp Reply with quote

Bonjour à tous.
Je découvre à peine Smarty 3 et je n'arrive pas à renouveler les caches selon un temps donné.
Je m'explique:
Je veut que les caches ne soient renouvelés que lorsque j'ai mis un catalogue à jour.
J'ai le timestamp de la mise à jour du catalogue et au besoin celui de la prochaine mise à jour.

Ma question:
Comment faire avec isCached qui ne prend qu'un temps donné par rapport à time() ?

Si une âme charitable passe par là !!!

Cordialement.

Bon j'ai trouvé, il suffit juste de savoir et la doc n'est pas très explicite.
Il faut mettre $caching = CACHING_LIFETIME_CURRENT et pas CACHING_LIFETIME_SAVED
$Smarty->setCaching(Smarty::CACHING_LIFETIME_CURRENT);
Et $cachelifetime HEURE ACTUELLE moins DERNIERE MISE A JOUR DU CATALOGUE
$Smarty->setCacheLifetime(time()-$last_update);
Back to top
View user's profile Send private message
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