Re: A patch to keep cache directory out of webroot
[email protected] (mikespub) Sun, 03 Oct 2004 13:22:17 GMT
| Newsgroups | gmane.comp.cms.xaraya.patches |
|---|---|
| Organization | not much |
| Message-ID | <[email protected]> |
In article <[email protected]>, Marcel van der Boom <[email protected]> wrote: >Jonn Beames wrote: >> Unfortunately, not possible for a number of reasons. For page caching, >> the output directory must be known before the modules are loaded. For >> the most efficient page caching, the output directory must be know >> before xarCore is loaded. >> >> We can, however, consider setting the output directory in the >> config.caching.php file which is read by both xarCache and xarCacheManager. >And managed by xarCacheManager i assume? Let me rephrase a bit what i >meant. The location should be a modvar for the xarCacheManager module, >just like all the other settings. config.caching.php is currently the >way we have to store these variables during runtime (note the 'currently'). >I actually thought the other settings were already modvars in >xarCachemanager, am i wrong? > <leaving xarCache aside for the moment> Normally, the location of the var path should be retrieved from one place, namely xarCoreGetVarDirPath(). However, this is not used consistently throughout the core/modules at the moment, and should be cleaned up. Also, as MrB mentioned, although most sub-directories under var/ are not supposed to be accessible via web, there are a few cases that do assume (possible) access, e.g. : - var/processes/*/graph/ for workflow process graphs, - var/uploads/ for uploaded files when the uploads module is not used, - var/calendar/*.ics depending on the evolution of the calendar module As for where this should be stored, it could be either a module variable, or (preferably) a configuration variable since it's site-wide. </leaving xarCache aside for the moment> Specifically for xarCache, this configuration variable should then be made available through config.caching.php as well (whenever the xarcachemanager module updates it, or when the value changes), so that it can be used without core loading too. But this concerns only the var/cache/config.caching.php file and the location of the var/cache/output directory - the first needs to be known in advance, while the second can be defined in config.caching.php. Mike.