PITS /
01427: Use an SDV for PageCacheFile
Summary: Use an SDV for PageCacheFile
Created: 2018-03-30 08:41
Status: Open
Category: Feature
From: CarlosAB
Assigned:
Priority: 2
Version: 2.2.107
OS: linux-4.9/apache 2.0/php 7.2
Description: Is it possible to use a SDV on caches.php, line 61, like this:
SDV($PageCacheFile , "$PageCacheDir/$pagename,cache");
Also I don't see where or when the PageCacheFile is written.
Is it done elsewhere?
CarlosAB March 30, 2018, at 08:41 AM
$PageCacheFile is written and read in the function HandleBrowse() in pmwiki.php.
I did it differently, because if you define this in config.php in some cases $pagename
will not be available yet.
SDV($PageCacheFileFmt, "%1$s/%2$s,cache"); SDV($PageCacheFile, sprintf($PageCacheFileFmt,$PageCacheDir
,$pagename
));
This way, you can define the $PageCacheFileFmt any way you like, and if present, %1$s will be replaced by $PageCacheDir
, %2$s will be replaced by the correct $pagename
. Will be added for the next version. --Petko March 30, 2018, at 09:12 AM
Ok, thanks Petko. CarlosAB March 31, 2018, at 07:34 AM