Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

How to get the cache's file path

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
tarmstrong
Smarty n00b


Joined: 15 Feb 2016
Posts: 3

PostPosted: Thu Feb 27, 2020 8:00 pm    Post subject: How to get the cache's file path Reply with quote

Hi,

I'm trying to obtain the path of the cached copy of a webpage

Code:
$smarty->cache_dir = "smarty_cache_directory";
if($smarty->isCached("mytemplate.tpl")) {
   $mypath = $smarty->cachepath("mytemplate.tpl");
   print $mypath;
}


In order words, I'd like to obtain the hash of "smarty_cache_directory/hash.mytemplate.html". Does the 'cachepath' property exist?

Thank you!
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1633

PostPosted: Sat Feb 29, 2020 8:35 am    Post subject: Reply with quote

What for?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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