[squid-users] Is there any convient way to transfer Cache Digest Diff ??

From: 林英超 <r88074@dont-contact.us>
Date: Thu, 19 Apr 2001 01:53:01 +0800

Dear all:
       I am trying to implement Diff Cache Digest .But now I meet some
problems.

   My problem is that it is difficult to transfer Cache Digest Diff among
squid proxy server ....

   I try to register a StoreEntry like storeDigestRewriteStart() and
storeDigestRewriteResume() do.

   but I don't know how to let it's peers get the Cache Digest Diff because
the peerDigestFetchReply()

   peerDigestSwapInHeaders(),peerDigestSwapInCBlock(),peerDigestSwapInMask()
is much more

   complicated, and it's not easy to modify it ......

  Can any one tell me a convient way to transfer Cache Digest Diff ?????

  Thankx in advance ......

storeDigestRewriteStart()
{
----------snip---------------

 #ifdef DIFF_DIGESTS
    debug(71, 2) ("diffDigestRewrite: start rewrite #%d\n",
sd_state.rewrite_count + 1);
    /* make new diff digest entry */
    url2 = internalLocalUri("/squid-internal-periodic/",
DiffDigestFileName);
    flags2 = null_request_flags;
    flags2.cachable = 1;
    dd_state.rewrite_lock = e2 = storeCreateEntry(url2, url2, flags2,
METHOD_GET);
#endif
------------snip---------------
}

storeDigestRewriteResume()
{
------------------------snip-------------------
#ifdef DIFF_DIGESTS
    dd_state.rewrite_offset = 0;
    EBIT_SET(e2->flags, ENTRY_SPECIAL);
    /* setting public key will purge old digest entry if any */
    storeSetPublicKey(e2);
    /* fake reply */
    httpReplyReset(e2->mem_obj->reply);
    httpReplySetHeaders(e2->mem_obj->reply, 1.0, 200, "Cache Digest OK",
        "application/cache-digest", diff_digest->mask_size +
sizeof(sd_state.cblock),
        squid_curtime, squid_curtime + Config.digest.rewrite_period);
    debug(71, 3) ("DiffDigestRewrite: entry expires on %d (%+d)\n",
        e2->mem_obj->reply->expires, e2->mem_obj->reply->expires -
squid_curtime);
    storeBuffer(e2);
    httpReplySwapOut(e2->mem_obj->reply, e2);
    storeDigestCBlockSwapOut(e2);
    storeBufferFlush(e2);

#endif
----------------------snip------------------
}
Received on Wed Apr 18 2001 - 11:54:17 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:59:22 MST