cvs: pear /Net_LDAP2/LDAP2 SimpleFileSchemaCache.php
| From: | Benedikt Hallinger | Date: | Thu, 30 Apr 2009 11:00:32 +0000 |
| Subject: | cvs: pear /Net_LDAP2/LDAP2 SimpleFileSchemaCache.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-56019@lists.php.net to get a copy of this message | ||
beni Thu Apr 30 11:00:32 2009 UTC
Modified files:
/pear/Net_LDAP2/LDAP2 SimpleFileSchemaCache.php
Log:
* Added described "endless" cache feature to simple cache
http://cvs.php.net/viewvc.cgi/pear/Net_LDAP2/LDAP2/SimpleFileSchemaCache.php?r1=1.1&r2=1.2&diff_format=u
Index: pear/Net_LDAP2/LDAP2/SimpleFileSchemaCache.php
diff -u pear/Net_LDAP2/LDAP2/SimpleFileSchemaCache.php:1.1
pear/Net_LDAP2/LDAP2/SimpleFileSchemaCache.php:1.2
--- pear/Net_LDAP2/LDAP2/SimpleFileSchemaCache.php:1.1 Thu Apr 30 10:57:33 2009
+++ pear/Net_LDAP2/LDAP2/SimpleFileSchemaCache.php Thu Apr 30 11:00:32 2009
@@ -10,7 +10,7 @@
* @author Benedikt Hallinger <beni@php.net>
* @copyright 2009 Benedikt Hallinger
* @license http://www.gnu.org/copyleft/lesser.html LGPL
-* @version CVS: $Id: SimpleFileSchemaCache.php,v 1.1 2009/04/30 10:57:33 beni Exp $
+* @version CVS: $Id: SimpleFileSchemaCache.php,v 1.2 2009/04/30 11:00:32 beni Exp $
* @link http://pear.php.net/package/Net_LDAP2/
*/
@@ -70,7 +70,7 @@
$return = false; // Net_LDAP2 will load schema from LDAP
if (file_exists($this->config['path'])) {
$cache_maxage = filemtime($this->config['path']) +
$this->config['max_age'];
- if (time() <= $cache_maxage) {
+ if (time() <= $cache_maxage || $this->config['max_age'] == 0) {
$return = unserialize(file_get_contents($this->config['path']));
}
}