+----------------------------------------------------------------------+
| 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 |
*/
-/* $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"
#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)
{
for (i = 0; i < num_slots; i++) {
cache->slots[i] = NULL;
}
- cache->expunge_cb = apc_cache_expunge;
return 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;