Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 23 09:02:06 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id mANH2619016842 for ; Sun, 23 Nov 2008 09:02:06 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id mANH0Dav023616 for ; Sun, 23 Nov 2008 09:00:13 -0800 Message-Id: <200811231700.mANH0Dav023616@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Deleting files from cache and Get response message Date: Sun, 23 Nov 2008 09:00:13 -0800 From: Bill Cheng Someone wrote: > Do we need to separate permanent storage with cache storage physically. To separage them physically is not a good idea. > For example, under files directory, it has 1,2,3,4,5 files, and 1,3,5 > are in permanent, 2,4 are in cache. It has a file says: "permanent: 1 3 > 5; cache: 2 4". Is it OK? Of course. It's up to you. My suggestion is that since your LRU file says "4 2" or "2 4", you can just use that. Everything on the LRU is in cache. Everything not on the LRU is in perm storage. > If it moves 2 to permanent, the file will change to "permanent: 1 2 3 5; > cache: 4". Correct? That's fine. -- Bill Cheng // bill.cheng@usc.edu Bill Cheng wrote: > Someone wrote: > > > We are maintaining a separate directory for cache. > > Now to maintain the size of the cache we need to delete the LRU files from > > the cache. > > So while deleting should we delete the meta as well as the data file from > > the cache? > > Of course! > > > Suppose there are three nodes > > A-----------> B--------------------> C > > > > A sends a search which gets flooded to B and C. Now after the search > > responses are received, A sends the get request for a file on C. > > Does node B have to cache the file? > > Depends on CacheProb. > -- > Bill Cheng // bill.cheng@usc.edu