uw Fri Mar 2 06:00:43 2001 EDT
Modified files:
/php4/pear/Cache/Container file.php
Log:
Fixed expire date bug.
Index: php4/pear/Cache/Container/file.php
diff -u php4/pear/Cache/Container/file.php:1.2 php4/pear/Cache/Container/file.php:1.3
--- php4/pear/Cache/Container/file.php:1.2 Thu Mar 1 09:18:23 2001
+++ php4/pear/Cache/Container/file.php Fri Mar 2 06:00:43 2001
@@ -16,7 +16,7 @@
// | Sebastian Bergmann <[EMAIL PROTECTED]> |
// +----------------------------------------------------------------------+
//
-// $Id: file.php,v 1.2 2001/03/01 17:18:23 sbergmann Exp $
+// $Id: file.php,v 1.3 2001/03/02 14:00:43 uw Exp $
require_once 'Cache/Container.php';
@@ -24,7 +24,7 @@
* Stores cache contents in a file.
*
* @author Ulf Wendel <[EMAIL PROTECTED]>
-* @version $Id: file.php,v 1.2 2001/03/01 17:18:23 sbergmann Exp $
+* @version $Id: file.php,v 1.3 2001/03/02 14:00:43 uw Exp $
*/
class Cache_Container_file extends Cache_Container {
@@ -103,6 +103,7 @@
// file format:
// 1st line: expiration date
// 2nd+ lines: cache data
+ $expire = ($expire) ? $expire + time() : 0;
fwrite($fh, $expire . "\r\n");
fwrite($fh, $this->encode($data));
@@ -116,7 +117,7 @@
function delete($id) {
-
+
$this->flushPreload($id);
$file = $this->getFilename($id);
@@ -133,7 +134,7 @@
function flush() {
-
+
$this->flushPreload();
if (!($dh = opendir($this->cache_dir)))
@@ -218,4 +219,4 @@
} // end func getFilename
}
-?>
+?>
\ No newline at end of file
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]