Re: safemode & caching
B.Kamer <[email protected]> Tue, 22 Mar 2005 22:24:59 +0100
| Newsgroups | gmane.comp.lib.binarycloud.devel |
|---|---|
| Message-ID | <[email protected]> |
hi
this is what can be done to keep bc able to run on safemode enabled
installations, just want your approval first
Detection
Project.php detects safemode and modifies (if necessary) the
configuration of binarycloud & smarty by directly modifying the
Conf->configuration array. I know this is not really necessary and
could be just changeable via the configuration files, but i do like the
fact that i don't have to think about it anymore. I therefore added a
private method Project::_autoConfig() which currently only does this,
but could do more magic later on...
minor question; Should the factory array or the workspace array or both
be modified?
NDFCache
Only creates sub directories if allowed by
Conf::get('/binarycloud/use_sub_dirs').
cached as: /tmp/ndf/en_UK/9375df07cf2261ea16602c9527de517a.php
or /tmp/ndf/en_UK9375df07cf2261ea16602c9527de517a.php
changes to smarty cache and the compile directory.
- don't create any directories in Template::_generateSmartyConf and do
not change the compile dir en cache dir. Let smarty handle this, it
known how to do this allready...
- to instruct smarty it needs to create a different cache file from one
template if the locale is different we should use a different 'seed' or
'cache_id' as smarty calls it for each locale. This should be modified
in Template::fetch(). Get the locale information and add it to to the
(if any) $cache_id.
- the same trick goes for the compile directory. $compile_id . $locale
Does anybody see any problems in this approach? Especially with
smarty...? It seems to work here locally, but very limited
caching/micing of locales & templates, so not sure if this would
conflict somewere...
bas
_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev