pluf2

pluf2 Commit Details


Date:2009-01-12 14:49:08 (15 years 11 months ago)
Author:Loic d'Anterroches
Branch:master
Commit:3aa1b808765dc9cc526fc9da95b6a7698a1d7fdd
Parents: 51b866c4ea39660b7e837fa5fc716f2cfb7a187e
Message:Fixed to have a correct boolean check.

Changes:

File differences

src/Pluf/Cache.php
3232
3333
3434
35
35
3636
3737
3838
3939
4040
4141
42
42
4343
4444
4545
......
5454
5555
5656
57
57
5858
5959
6060
* Default timeout in seconds is defined by the 'cache_timeout'
* configuration variable.
*
* <code>
* <pre>
* $cache = new Pluf_Cache::factory();
* if (null === ($foo=$cache->get('my-key'))) {
* $foo = run_complex_operation();
* $cache->set('my-key', $foo);
* }
* return $foo;
* </code>
* </pre>
*
* The value to be stored in the cache must be serializable.
*
*/
public static function factory()
{
if (false == ($engine = Pluf::f('cache_engine', false))) {
if (false === ($engine=Pluf::f('cache_engine', false))) {
throw new Pluf_Exception_SettingError('"cache_engine" setting not defined.');
}
if (!isset($GLOBALS['_PX_Pluf_Cache-'.$engine])) {

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05434s using 13 queries.