extern void storeUnregisterAbort(StoreEntry * e);
extern void storeMemObjectDump(MemObject * mem);
extern const char *storeUrl(const StoreEntry *);
+extern void storeCreateMemObject(StoreEntry *, const char *, const char *);
/* storeKey stuff */
extern const cache_key *storeKeyDup(const cache_key *);
/*
- * $Id: stat.cc,v 1.166 1997/11/03 22:43:20 wessels Exp $
+ * $Id: stat.cc,v 1.167 1997/11/03 23:18:17 wessels Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
if ((++N & 0xFF) == 0) {
debug(18, 3) ("stat_objects_get: Processed %d objects...\n", N);
}
- storeAppendPrintf(sentry, "%s %s\n",
+ BIT_SET(sentry->flag, DELAY_SENDING);
+ storeAppendPrintf(sentry, "KEY %s\n", storeKeyText(entry->key));
+ storeAppendPrintf(sentry, "\t%s %s\n",
RequestMethodStr[entry->method], storeUrl(entry));
storeAppendPrintf(sentry, "\t%s\n", describeStatuses(entry));
storeAppendPrintf(sentry, "\t%s\n", describeFlags(entry));
storeAppendPrintf(sentry, "\t\tswapin_fd: %d\n",
(int) sc->swapin_fd);
}
+ BIT_CLR(sentry->flag, DELAY_SENDING);
+ storeAppendPrintf(sentry, "\n");
}
}
/*
- * $Id: store.cc,v 1.333 1997/11/03 22:43:22 wessels Exp $
+ * $Id: store.cc,v 1.334 1997/11/03 23:18:18 wessels Exp $
*
* DEBUG: section 20 Storeage Manager
* AUTHOR: Harvest Derived
/* ideally the full scan period should be configurable, for the
* moment it remains at approximately 24 hours. */
store_hash_buckets = storeKeyHashBuckets(i);
- store_maintain_rate = store_hash_buckets / 86400;
+ store_maintain_rate = 86400 / store_hash_buckets;
assert(store_maintain_rate > 0);
debug(20, 1) ("Using %d Store buckets, maintain %d bucket%s every %d second%s\n",
store_hash_buckets,
storeUrl(const StoreEntry * e)
{
if (e == NULL)
- return "[null entry]";
+ return "[null_entry]";
else if (e->mem_obj == NULL)
- return "[null mem_obj]";
+ return "[null_mem_obj]";
else
return e->mem_obj->url;
}
+
+void
+storeCreateMemObject(StoreEntry * e, const char *url, const char *log_url)
+{
+ if (e->mem_obj)
+ return;
+ e->mem_obj = new_MemObject(url, log_url);
+}