#
# Makefile for the Harvest Object Cache server
#
-# $Id: Makefile.in,v 1.17 1996/04/12 00:11:02 wessels Exp $
+# $Id: Makefile.in,v 1.18 1996/04/15 22:50:00 wessels Exp $
#
# Uncomment and customize the following to suit your needs:
#
PROGS = cached
UTILS = client dnsserver ftpget
CGIPROGS = cachemgr.cgi
-OBJS = acl.o cache_cf.o cached_error.o comm.o \
+OBJS = acl.o background.o cache_cf.o cached_error.o comm.o \
connect.o debug.o disk.o dynamic_array.o \
fdstat.o filemap.o ftp.o gopher.o \
hash.o http.o icp.o ipcache.o \
-/* $Id: main.cc,v 1.32 1996/04/15 18:01:04 wessels Exp $ */
+/* $Id: main.cc,v 1.33 1996/04/15 22:53:35 wessels Exp $ */
/* DEBUG: Section 1 main: startup and main loop */
int n; /* # of GC'd objects */
time_t last_maintain = 0;
time_t last_announce = 0;
+ time_t loop_delay;
errorInitialize();
if (getCleanRate() > 0)
next_cleaning = time(0L) + getCleanRate();
while (1) {
+ loop_delay = (time_t) 60;
/* maintain cache storage */
if (cached_curtime > last_maintain) {
storeMaintainSwapSpace();
last_maintain = cached_curtime;
}
- switch (comm_select((time_t) 60, next_cleaning)) {
+ /* do background processing */
+ if (doBackgroundProcessing())
+ loop_delay = (time_t) 0;
+ switch (comm_select(loop_delay, next_cleaning)) {
case COMM_OK:
/* do nothing */
break;
-/* $Id: squid.h,v 1.15 1996/04/11 22:52:30 wessels Exp $ */
+/* $Id: squid.h,v 1.16 1996/04/15 22:54:07 wessels Exp $ */
#include "config.h"
#include "autoconf.h"
#include "send-announce.h"
#include "acl.h"
#include "util.h"
+#include "background.h"
extern time_t cached_starttime; /* main.c */
extern time_t next_cleaning; /* main.c */