|
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 |
orao Smarty Rookie
Joined: 23 Dec 2009 Posts: 20
|
Posted: Wed Feb 11, 2015 4:06 pm Post subject: Is it possible to get cache mtime? |
|
|
Hi,
Is it possible to get file_mtime of cached template?
example:
I need to find out know when the cache file for "index.tpl" with cache_id "123" was created?
Thanks |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Feb 11, 2015 6:09 pm Post subject: |
|
|
You don't need to know it. Please. Don't create more issues than what you can solve.
All you need to know, is if there's valid cache for given template/cacheId/compileId (means, Smarty::isCached()), nothing more. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Feb 11, 2015 9:43 pm Post subject: |
|
|
To answer the original question
Code: | $tpl = $smarty->createTemplate('index.tpl','123');
$mtime = $tpl->cached->timestamp; |
|
|
Back to top |
|
orao Smarty Rookie
Joined: 23 Dec 2009 Posts: 20
|
Posted: Fri Apr 03, 2015 3:29 pm Post subject: |
|
|
Thank you, U.Tews |
|
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
|