New PHP5 APC - version 3.0.19, using PHP5 5.2.0-8+etch11,
[php5-apc.git] / apc_cache.c
index 62d5f8b..a837871 100644 (file)
@@ -2,7 +2,7 @@
   +----------------------------------------------------------------------+
   | APC                                                                  |
   +----------------------------------------------------------------------+
-  | Copyright (c) 2006 The PHP Group                                     |
+  | Copyright (c) 2008 The PHP Group                                     |
   +----------------------------------------------------------------------+
   | This source file is subject to version 3.01 of the PHP license,      |
   | that is bundled with this package in the file LICENSE, and is        |
@@ -28,7 +28,7 @@
 
  */
 
-/* $Id: apc_cache.c,v 3.145.2.2 2008/03/25 18:24:57 gopalv Exp $ */
+/* $Id: apc_cache.c,v 3.145.2.4 2008/05/11 18:57:00 rasmus Exp $ */
 
 #include "apc_cache.h"
 #include "apc_lock.h"
@@ -54,8 +54,6 @@
 #define key_equals(a, b) (a.inode==b.inode && a.device==b.device)
 /* }}} */
 
-static void apc_cache_expunge(apc_cache_t* cache, size_t size);
-
 /* {{{ hash */
 static unsigned int hash(apc_cache_key_t key)
 {
@@ -265,7 +263,6 @@ apc_cache_t* apc_cache_create(int size_hint, int gc_ttl, int ttl)
     for (i = 0; i < num_slots; i++) {
         cache->slots[i] = NULL;
     }
-    cache->expunge_cb = apc_cache_expunge;
 
     return cache;
 }
@@ -307,21 +304,9 @@ void apc_cache_clear(apc_cache_t* cache)
 /* }}} */
 
 /* {{{ apc_cache_expunge */
-static void apc_cache_expunge(apc_cache_t* cache, size_t size)
+void apc_cache_expunge(apc_cache_t* cache, time_t t)
 {
     int i;
-    time_t t;
-    TSRMLS_FETCH();
-
-#if PHP_API_VERSION < 20041225
-#if HAVE_APACHE && defined(APC_PHP4_STAT)
-    t = ((request_rec *)SG(server_context))->request_time;
-#else
-    t = time(0);
-#endif
-#else
-    t = sapi_get_request_time(TSRMLS_C);
-#endif
 
     if(!cache) return;