+uns
+qache_probe(struct qache *q, qache_key_t *key, uns pos, byte **datap, uns *sizep, uns start)
+{
+ if (!pos || pos >= q->hdr->max_entries)
+ {
+ DBG("Probe %d: Out of range", pos);
+ return ~0U;
+ }
+
+ qache_lock(q);
+ uns ret = 0;
+ struct qache_entry *entry = &q->entry_table[pos];
+ if (entry->data_len != ~0U)
+ {
+ DBG("Probe %d: Found key <%s>", format_key(entry->key));
+ if (key)
+ memcpy(key, entry->key, sizeof(qache_key_t));
+ copy_out(q, entry, datap, sizep, start);
+ ret = pos;
+ }
+ else
+ DBG("Probe %d: Empty", pos);
+ qache_unlock(q, 0);
+ return ret;
+}
+