(FILECREATED " 3-Sep-86 15:41:29" {PHYLUM}<LANNING>FILECACHE>FILECACHE-BROWSER.;4 24380  

      changes to:  (FNS \FCACHE.INSPECT.PROPCOMMANDFN \FCACHE.BROWSE.CACHE \FCACHE.BROWSE.RECOMPUTE 
			\FCACHE.BROWSE.WHENSELECTEDFN)

      previous date: "30-Jul-86 16:18:57" {PHYLUM}<LANNING>FILECACHE>FILECACHE-BROWSER.;1)


(* Copyright (c) 1986 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT FILECACHE-BROWSERCOMS)

(RPAQQ FILECACHE-BROWSERCOMS ((* * The FileCache browser / inspector)
				(FNS \FCACHE.FLUSH.INFOHOOK)
				(* * Browsing thru the cache)
				(FNS \FCACHE.BROWSE.CACHE \FCACHE.BROWSE.COPYFN 
				     \FCACHE.BROWSE.PRINTFN \FCACHE.BROWSE.RECOMPUTE 
				     \FCACHE.BROWSE.WHENSELECTEDFN)
				(FNS \FCACHE.CLEAR.PROMPT.WINDOW)
				(FILES READNUMBER TABLEBROWSER)
				(INITVARS (\FCACHE.BROWSER NIL))
				(BITMAPS \FCACHE.ICON)
				(GLOBALVARS \FCACHE.BROWSER \FCACHE.ICON)
				(* * Inspecting the cache properties)
				(FNS \FCACHE.INSPECT.PROPCOMMANDFN \FCACHE.INSPECT.TITLEFN 
				     \FCACHE.INSPECT.VALUES \FCACHE.PROPERTY.NAMES)
				(DECLARE: EVAL@COMPILE DONTCOPY (FILES FILECACHE-DECLS 
								       TABLEBROWSERDECLS))))
(* * The FileCache browser / inspector)

(DEFINEQ

(\FCACHE.FLUSH.INFOHOOK
  [LAMBDA NIL                                                (* smL " 5-Feb-86 18:00")

          (* * The info hook function for the CACHE-FLUSH proc)


    (if (AND \FCACHE.BROWSER (type? TABLEBROWSER \FCACHE.BROWSER)
		 (WINDOWP (TB.WINDOW \FCACHE.BROWSER)))
	then (OPENW (TB.WINDOW \FCACHE.BROWSER))
	       (\FCACHE.BROWSE.RECOMPUTE \FCACHE.BROWSER)
      else (SETQ \FCACHE.BROWSER (\FCACHE.BROWSE.CACHE])
)
(* * Browsing thru the cache)

(DEFINEQ

(\FCACHE.BROWSE.CACHE
  [LAMBDA NIL                                                (* smL "22-Aug-86 09:19")

          (* * Build a browser for the cache)


    (LET* [[menu (create MENU
			   ITEMS ←(QUOTE ((Delete Delete 
	      "Mark for deletion the selected files in the cache (but leave the real file alone)")
					     (Prune Prune 
	    "Mark for deletion files in the cache that have not been touched in a number of days")
					     (Undelete Undelete 
						     "Undelete the selected files from the cache")
					     (Inspect Inspect 
						  "Inspect the cache entry for the selected file")
					     (Filter Filter 
				     "Browse only those files whose name matches a given pattern")
					     (Recompute Recompute "Recompute the browser contents")
					     (Expunge Expunge 
				      "Get rid of those cache files that are marked for deletion")
					     (Scavenge Scavenge 
	      "Scavenge the cache device, looking for files that the cacher might have forgotten")))
			   CENTERFLG ← T
			   MENUROWS ← 1
			   MENUOUTLINESIZE ← 1
			   WHENSELECTEDFN ←(FUNCTION \FCACHE.BROWSE.WHENSELECTEDFN)
			   MENUFONT ←(FONTCREATE (QUOTE Helvetica)
						   10
						   (QUOTE BOLD]
	   (inspectWindow (CREATEW (CREATEREGION SCREENWIDTH SCREENHEIGHT
						     (TIMES 25 (STRINGWIDTH "A" DEFAULTFONT))
						     (HEIGHTIFWINDOW (TIMES (LENGTH (
									   \FCACHE.PROPERTY.NAMES))
										(FONTPROP
										  DEFAULTFONT
										  (QUOTE HEIGHT)))
								       T))
				     "File cache props"))
	   [cacheBrowserWindowRegion (GETREGION (fetch IMAGEWIDTH of menu)
						  (PLUS (fetch IMAGEHEIGHT of menu)
							  (fetch HEIGHT of (WINDOWPROP
										 inspectWindow
										 (QUOTE REGION]
	   (cacheBrowserWindow (CREATEW (CREATEREGION (fetch LEFT of cacheBrowserWindowRegion)
							  (fetch BOTTOM of 
									 cacheBrowserWindowRegion)
							  [DIFFERENCE (fetch WIDTH of 
									 cacheBrowserWindowRegion)
									(fetch WIDTH
									   of (WINDOWPROP
										  inspectWindow
										  (QUOTE REGION]
							  (DIFFERENCE (fetch HEIGHT of 
									 cacheBrowserWindowRegion)
									(fetch IMAGEHEIGHT
									   of menu)))
					  "File cache browser"))
	   (cacheBrowser (TB.MAKE.BROWSER NIL cacheBrowserWindow
					    (QUOTE (USERDATA "*.*;*" PRINTFN \FCACHE.BROWSE.PRINTFN 
							       COPYFN \FCACHE.BROWSE.COPYFN]
                                                             (* Glue the inspect window to the right of the browser
							     window)
          (ATTACHWINDOW inspectWindow cacheBrowserWindow (QUOTE RIGHT)
			  (QUOTE TOP))
          [WINDOWPROP inspectWindow (QUOTE MINSIZE)
			(CONS (fetch WIDTH of (WINDOWPROP inspectWindow (QUOTE REGION)))
				(fetch HEIGHT of (WINDOWPROP inspectWindow (QUOTE REGION]
          [WINDOWPROP inspectWindow (QUOTE MAXSIZE)
			(CONS (fetch WIDTH of (WINDOWPROP inspectWindow (QUOTE REGION)))
				(fetch HEIGHT of (WINDOWPROP inspectWindow (QUOTE REGION]
          (WINDOWPROP cacheBrowserWindow (QUOTE inspectWindow)
			inspectWindow)
          (INSPECTW.CREATE \FCACHE.PROPERTIES (FUNCTION \FCACHE.PROPERTY.NAMES)
			     (FUNCTION \FCACHE.INSPECT.VALUES)
			     (FUNCTION [LAMBDA (object property newvalue)
				 (FCACHE.PUTPROP property newvalue])
			     (FUNCTION \FCACHE.INSPECT.PROPCOMMANDFN)
			     (FUNCTION NILL)
			     (FUNCTION \FCACHE.INSPECT.TITLEFN)
			     "File cache props" NIL inspectWindow)
                                                             (* Glue the menu window to the top of the browser 
							     window)
          (PUTMENUPROP menu (QUOTE CacheBrowser)
			 cacheBrowser)
          (ATTACHMENU menu cacheBrowserWindow (QUOTE TOP))
                                                             (* Give the window set a cute icon)
          [WINDOWPROP cacheBrowserWindow (QUOTE ICONFN)
			(FUNCTION (LAMBDA (window icon)
			    (OR icon (LET ((iconW (CREATEW (GETBOXREGION (BITMAPWIDTH 
										     \FCACHE.ICON)
									       (BITMAPHEIGHT 
										     \FCACHE.ICON))
							       NIL 0)))
					    (BITBLT \FCACHE.ICON NIL NIL iconW)
					iconW]               (* Update the display)
          (\FCACHE.BROWSE.RECOMPUTE cacheBrowser)
      cacheBrowser])

(\FCACHE.BROWSE.COPYFN
  [LAMBDA (cacheBrowser item)                                (* smL " 4-Feb-86 13:48")

          (* * The copybutton went down on the item)


    (COPYINSERT (fetch REMOTEFILENAME of (fetch TIDATA of item])

(\FCACHE.BROWSE.PRINTFN
  [LAMBDA (cacheBrowser item window)                         (* smL " 3-Feb-86 17:19")

          (* * The PRINTFN for the cache browser)


    (LET ((entry (fetch TIDATA of item)))
         (printout window (fetch REMOTEFILENAME of entry)
		   .TAB0
		   (MAX (ADD1 (POSITION window))
			  60)
		   (if (\FCACHE.ENTRYOPEN? entry)
		       then "Open"
		     else "    ")
		   .TAB0
		   (MAX (ADD1 (POSITION window))
			  65)
		   (if (fetch CACHEISDIRTY of entry)
		       then "Dirty"
		     else "     "])

(\FCACHE.BROWSE.RECOMPUTE
  [LAMBDA (cacheBrowser)                                     (* smL "22-Aug-86 09:22")

          (* * The REPAINT function for a cache browser)


    (for entry in \FCACHE.LIST
       bind (filter ←(TB.USERDATA cacheBrowser))
	      (cacheBrowserWindow ←(TB.WINDOW cacheBrowser))
	      (runningLength ← 0)
	      (numberOfFiles ← 0)
	      (numberDirty ← 0)
	      (numberOpen ← 0)
       first (\FCACHE.CLEAR.PROMPT.WINDOW cacheBrowserWindow)
	       (TB.REPLACE.ITEMS cacheBrowser)
       when (\FCACHE.FILEMATCH? (fetch REMOTEFILENAME of entry)
				    filter)
       do (TB.INSERT.ITEM cacheBrowser (create TABLEITEM
						     TIDATA ← entry
						     TIUNDELETABLE ← T))
	    (add runningLength (fetch CACHEFILELENGTH of entry))
	    (add numberOfFiles 1)
	    (if (fetch CACHEISDIRTY of entry)
		then (add numberDirty 1))
	    (if (\FCACHE.ENTRYOPEN? entry)
		then (add numberOpen 1))
       finally (WINDOWPROP cacheBrowserWindow (QUOTE TITLE)
			       (CONCAT "File cache (v" FCACHE.VERSION.NUMBER ") -- " numberOfFiles 
					 " files ("
					 runningLength " pages) matching " (TB.USERDATA 
										     cacheBrowser)
					 " -- " numberDirty " dirty, " numberOpen " open"))
		 (INSPECTW.REDISPLAY (WINDOWPROP cacheBrowserWindow (QUOTE inspectWindow])

(\FCACHE.BROWSE.WHENSELECTEDFN
  [LAMBDA (item menu button)                                 (* smL "22-Aug-86 09:18")

          (* * The WHENSELECTEDFN for the FileCache browser)


    (RESETLST
      (if item
	  then
	   (RESETSAVE (SHADEITEM item menu GRAYSHADE)
			(LIST (FUNCTION SHADEITEM)
				item menu WHITESHADE))
	   (LET [(cacheBrowser (GETMENUPROP menu (QUOTE CacheBrowser]
	        (SELECTQ (if (LITATOM item)
			       then item
			     else (CADR item))
			   [Delete (TB.MAP.SELECTED.ITEMS cacheBrowser (FUNCTION (LAMBDA (
								  cacheBrowser item)
								(TB.DELETE.ITEM cacheBrowser item]
			   [Prune                            (* Thanks to MikeDixon for this idea)
				  (bind (old.date ←(DIFFERENCE (IDATE)
								   (TIMES (RNUMBER 
						       "Delete files untouched in how many days?"
										       NIL NIL NIL T)
									    86400)))
					  (numberDeleted ← 0) for tableItem
				     in (fetch TBITEMS of cacheBrowser)
				     when (AND (NUMBERP (fetch CACHETIMECLOSED
								 of (fetch TIDATA of tableItem))
							      )
						   (LESSP (fetch CACHETIMECLOSED
							       of (fetch TIDATA of tableItem))
							    old.date))
				     do (TB.DELETE.ITEM cacheBrowser tableItem)
					  (add numberDeleted 1)
				     finally (\FCACHE.PRINT.PROMPT (TB.WINDOW cacheBrowser)
								       (LIST (CONCAT "Marked " 
										    numberDeleted 
								     " cache enties for deletion"]
			   [Undelete (TB.MAP.SELECTED.ITEMS cacheBrowser (FUNCTION (LAMBDA (
								    cacheBrowser item)
								  (TB.UNDELETE.ITEM cacheBrowser 
										      item]
			   [Inspect (LET [(firstSelectedItem (for tableItem
								in (fetch TBITEMS of 
										     cacheBrowser)
								thereis (fetch TISELECTED
									     of tableItem]
				         (if firstSelectedItem
					     then (INSPECT (fetch TIDATA of firstSelectedItem]
			   (Filter (TB.USERDATA cacheBrowser (PACKFILENAME.STRING
						    (QUOTE BODY)
						    (PROMPTFORWORD ">" (TB.USERDATA cacheBrowser)
								     NIL
								     (\FCACHE.PRINT.PROMPT
								       (TB.WINDOW cacheBrowser)
								       (LIST 
								  "Browse entries matching what ")))
						    (QUOTE BODY)
						    "*.*;*"))
				   (DOSELECTEDITEM menu (QUOTE Recompute)
						     button)
				   (\FCACHE.PRINT.PROMPT (TB.WINDOW cacheBrowser)))
			   (Recompute (\FCACHE.BROWSE.RECOMPUTE cacheBrowser))
			   [Expunge [TB.MAP.DELETED.ITEMS cacheBrowser
							    (FUNCTION (LAMBDA (cacheBrowser item)
								(if (\FCACHE.DELETE.ENTRY
									(fetch TIDATA of item))
								    then (TB.REMOVE.ITEM 
										     cacheBrowser 
											     item]
				    (INSPECTW.REDISPLAY (WINDOWPROP (TB.WINDOW cacheBrowser)
									(QUOTE inspectWindow]
			   [Scavenge
			     (LET [(options (MENU (DEFERREDCONSTANT
						      (create MENU
								ITEMS ←(QUOTE
								  (("Collect files" (QUOTE None)
										    
				    "Scavenge the file cache, collecting a list of unknown files")
								    ("Existing files" (QUOTE EXISTS)
										      
			     "Scavenge the cache, making sure that each file in the cache exists")
								    ("Verify files" (QUOTE VERIFY)
										    
					   "Scavenge the cache, verifying each file in the cache")
								    ("Repair files" (QUOTE REPAIR)
										    
					 "Scavenge the cache, attempting to repair unknown files")))
								CENTERFLG ← T
								TITLE ← "Scavenge option"]
			          (if (NULL options)
				      then (\FCACHE.PRINT.PROMPT (TB.WINDOW cacheBrowser)
								     (QUOTE (
"Cache scavenge aborted")))
				    else (\FCACHE.PRINT.PROMPT (TB.WINDOW cacheBrowser)
								   (QUOTE ("Scavenging cache...")))
					   [PRINT (SETQ IT (FCACHE.SCAVENGE
							(SELECTQ options
								   (None NIL)
								   options]
					   (\FCACHE.PRINT.PROMPT (TB.WINDOW cacheBrowser)
								   (QUOTE (
"Cache scavenge completed"]
			   NIL])
)
(DEFINEQ

(\FCACHE.CLEAR.PROMPT.WINDOW
  [LAMBDA (window)                                           (* smL "30-Jul-86 15:05")

          (* * Clear the prompt window attached to the window, if there is one.)


    (LET ((pWindow (GETPROMPTWINDOW (MAINWINDOW window T)
				      NIL NIL T)))
         (if (WINDOWP pWindow)
	     then (CLEARW pWindow])
)
(FILESLOAD READNUMBER TABLEBROWSER)

(RPAQ? \FCACHE.BROWSER NIL)

(RPAQ \FCACHE.ICON (READBITMAP))
(102 76
"D@GF@D@@@@@@@AOLAB@HH@@@@@@@"
"OOOOOOOOOOOOOOOOOOOOOOOOOL@@"
"OOOOOOOOOOOOOOOOOOOOOOOOOL@@"
"OOOOOOOOOOOOCKOOOOOOOONCND@@"
"FMBCOOOOONCMGFNJOOOOOOJBJH@@"
"BAAKOOOKBIGAGJNBMMOOOOKJNL@@"
"OOOOOONJHLC@@@@JMLLOOOOOOL@@"
"OOOOOMJCL@@@@@@@@NHEMOOOOL@@"
"OOOOOMOH@@@@@@@@@@@MJKKOOD@@"
"B@H@DM@@@@@@@@@@@@@AKHEMIH@@"
"NLKNGH@@@@@@@@@@@@@@CIGOGL@@"
"M@@@D@@@@@@@@@@@@@@@@@@@@@@@"
"@@@@@@@@@@@@GL@@@@@@@@@@@@@@"
"@@@@@@@@@@@GOOH@@@@@@@@@@@@@"
"@D@H@@@@@@AOOON@@@@@@@@@@@@@"
"@@@@@@@@@@GOOOOH@@@H@DD@DD@@"
"B@BL@@@@@@OL@@CL@@@H@@@@D@@@"
"@@@@@@@@@AN@@@CN@@@H@@@@@D@@"
"@@@@@@@@@CHO@@GO@@@HB@@BD@@@"
"@@@@@@@@@GHO@@FOH@@@@@@@@@@@"
"@@@@@@@@@OHC@@FGL@@@@@@@@@@@"
"D@@@@@@@@OKDF@CGN@@@@@@@@@@@"
"OL@@@@@@ANCN@@@GN@@@@@@@@@@@"
"OL@@@@@@COHL@@CCO@@@@@@@@@@@"
"ON@@@@@@CONF@@@COH@@@@@@@@@@"
"OOH@@@@@GONB@@@COH@@@BJ@H@@@"
"AOH@@@@@GONB@@@@OL@@@@@@@@@@"
"@OL@@@@@OOOB@JMHGL@@@@@@@@@@"
"HGL@@@@@OOOJMNOHOL@@@@@@L@@@"
"@CL@@@@@OOKCNNOHOL@@@@AMOH@@"
"@CD@@@@@OOHDDBADON@@@@COOD@@"
"@CL@@@@AOONN@B@EON@@@@GNC@@@"
"BCL@@@@AOOON@C@GON@@@@KOO@@@"
"BGL@@@@AOOOO@A@GON@@@AKFGH@@"
"NGL@@@@AOOOO@GLGOO@@@AKGO@@@"
"@OL@@@@AOOOOHGHGOO@@@ACFCD@@"
"COH@@@@AOOOOH@@GOO@@@CKFCL@@"
"OOH@@@@AOOOOLGHGOO@@@CGGOL@@"
"ON@@@@@AOOOONC@GOO@@@CNGOL@@"
"OL@@@@@COOOONCHOOO@@@CNNGL@@"
"O@@@@@@COOOOO@AOOO@@@AKLCL@@"
"D@@@@@@AOOOOOOGOOO@@@AKGOL@@"
"@@@@@@@AOOOOOOOOON@@@AOKAL@@"
"@@@@@@@AOOOOOOIOOO@@@@OOGL@@"
"@@@@@@@AOOOOOOAOOO@@@@GOOL@@"
"HHIHD@@AOOOOO@COON@@@@COOL@@"
"@EE@D@@AOOOOL@COON@@@@AOKH@@"
"@HLDD@@AOOOON@COON@@@@@CL@@@"
"@@DDH@@@OOOON@COOL@@@@@@@@@@"
"@@@@@@@@OOOON@EOOL@@@@@@@@@@"
"@@@@@@@@OOOOO@AOOL@@@@@@@@@@"
"@@@@@@@@GOOOO@AOOL@@@@@@@@@@"
"@@@@@@@@GOOOOH@OOH@@@@@@@@@@"
"@@@@@@@@COOOOL@OOH@@@@@@@@@@"
"@@@DH@@@COOOON@GO@@@@@@@@@@@"
"DCLH@K@@AOOOON@GO@@@@@@G@@@@"
"@@@HAG@@AOOOON@GN@AO@@@@@@@@"
"@@@@@B@@@OOOOO@CH@@C@@@@@@@@"
"@@@@@L@@AKOOIOHCN@@E@@@@@@@@"
"MFOCIH@@AKO@BJ@AD@@@@@@@@@@@"
"@@@@@@@@@CH@CB@AH@@@@@@@@@@@"
"@@@@@@BD@@@NEENAD@DMMLII@@@@"
"@COEMJJLJGGNLDOMKOOOOOOOL@@@"
"@MBOAOLLKEONIEGO@DLOOKOO@@@@"
"@AHHHAEAI@D@@IL@BDIA@IECD@@@"
"FKIHHCC@HLDLHHMBBFAC@HGCNH@@"
"OOILICADHDHIH@EBEBAE@HEIN@@@"
"NOINICEEJLNOJJOFOOOOOOOONL@@"
"OOOOOOO@@@@A@A@@@@AOOOOOOH@@"
"OOOOOOOOKHOADIBGAOMOOOOOOL@@"
"OO@@@@B@CH@F@B@NANAL@BAKOL@@"
"OO@BHHHBAHDDBAANAN@L@B@COL@@"
"OOLCH@DBAHD@BAAJAB@D@F@AOL@@"
"OOLCHLDBCHDDBBA@@AHD@BNCOL@@"
"OONCMMONOOOOOOOOOOOOOOOOOL@@"
"OOOLOOOOOLIN@@@@@@@@@@@@@@@@")
(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS \FCACHE.BROWSER \FCACHE.ICON)
)
(* * Inspecting the cache properties)

(DEFINEQ

(\FCACHE.INSPECT.PROPCOMMANDFN
  [LAMBDA (property object inspectw)                         (* smL " 3-Sep-86 14:37")

          (* * What to do when the user has selected a property from the cache inspect window)


    (\FCACHE.CLEAR.PROMPT.WINDOW inspectw)
    (LET [[set?menu (LOADTIMECONSTANT (create MENU
						  ITEMS ←(QUOTE ((SET (QUOTE SET)
									  
								  "Set the value of the property"]
	  (addDeleteMenu (LOADTIMECONSTANT (create MENU
						       ITEMS ←(QUOTE ((Add (QUOTE Add)
									     "Add a host to the list")
									 (Remove (QUOTE Remove)
										 
								    "Remove a host from the list"]
         (SELECTQ
	   property
	   ((DEAD.HOSTS BADDEVICES)                          (* Add or delete a host from the current value)
	     (SELECTQ (MENU addDeleteMenu)
			[Add (LET [(host (MENU (create MENU
							   TITLE ← "Host to add"
							   ITEMS ←(BQUOTE
							     ((\,@(FCACHE.GETPROP (QUOTE DEVICES))
								)
							      ("Other host" "Other host" 
						"Prompt the user to type in the name of the host"]
			          [if (EQUAL host "Other host")
				      then (SETQ host (MKATOM (PROMPTFORWORD
								      ">" NIL NIL
								      (\FCACHE.PRINT.PROMPT
									inspectw
									(LIST 
							      "Enter name of host to add to list"]
			          (if host
				      then (pushnew (FCACHE.GETPROP property)
							host)
					     (INSPECTW.REDISPLAY inspectw]
			(Remove (if (NULL (FCACHE.GETPROP property))
				    then (\FCACHE.PRINT.PROMPT inspectw (LIST 
									    "No hosts to remove!"))
				  else (change (FCACHE.GETPROP property)
						   (DREMOVE (MENU (create MENU
										TITLE ← 
										"Host to remove"
										ITEMS ← DATUM))
							      DATUM))
					 (INSPECTW.REDISPLAY inspectw)))
			NIL))
	   ((DEVICES ENTRIES SIZE)
	     (\FCACHE.PRINT.PROMPT inspectw (LIST "Can't set that field!")))
	   [PREFIX (if (MENU set?menu)
		       then (LET [(pwindow (\FCACHE.PRINT.PROMPT inspectw (LIST 
								     "Enter the new cache prefix"
										      
						    "The expression read will NOT be EVALuated. "]
			           (if [NLSETQ (change (FCACHE.GETPROP property)
							     (MKATOM (PROMPTFORWORD ">" DATUM NIL 
											pwindow]
				       then (INSPECTW.REDISPLAY inspectw)
				     else (printout pwindow T "Bad cache prefix"]
	   ((MAXSIZE MAXFILEPAGES DUMPSLEEP DUMPIDLE KEEPVERSIONS UNSAFE.TIMEOUT TIMETOVERIFY)
	     (if (MENU set?menu)
		 then (change (FCACHE.GETPROP property)
				  (OR (RNUMBER (CONCAT "Value for " property)
						   NIL NIL NIL T)
					DATUM))
			(INSPECTW.REDISPLAY inspectw)))
	   (USECACHE (if (MENU set?menu)
			 then (change
				  (FCACHE.GETPROP property)
				  (SELECTQ (MENU (LOADTIMECONSTANT
						       (create MENU
								 ITEMS ←[QUOTE
								   (T Write Read (NIL (QUOTE OFF]
								 TITLE ← "Value for USECACHE")))
					     (T T)
					     (OFF NIL)
					     (NIL DATUM)
					     NIL))
				(INSPECTW.REDISPLAY inspectw)))
	   (FASTDIR (if (MENU set?menu)
			then (change
				 (FCACHE.GETPROP property)
				 (SELECTQ (MENU (LOADTIMECONSTANT
						      (create MENU
								ITEMS ←[QUOTE
								  (T (NIL (QUOTE OFF]
								TITLE ← "Value for FASTDIR")))
					    (T T)
					    (OFF NIL)
					    (NIL DATUM)
					    NIL))
			       (INSPECTW.REDISPLAY inspectw)))
	   (DELAY.DELETE (if (MENU set?menu)
			     then (change
				      (FCACHE.GETPROP property)
				      (SELECTQ (MENU (LOADTIMECONSTANT
							   (create MENU
								     ITEMS ←(QUOTE
								       ((T T 
					      "Don't delete local copy until the space is needed")
									 (NIL (QUOTE OFF)
									      
					    "Delete the local copy when the real file is deleted")))
								     TITLE ← "Value for DELAY.DELETE")
							   ))
						 (T T)
						 (OFF NIL)
						 (NIL DATUM)
						 NIL))
				    (INSPECTW.REDISPLAY inspectw)))
	   (UNSAFE.DEFAULT (if (MENU set?menu)
			       then
				(change (FCACHE.GETPROP property)
					  (SELECTQ
					    (MENU (LOADTIMECONSTANT
						      (create MENU
								ITEMS ←(QUOTE
								  ((T T 
								   "Go ahead and trust the cache")
								    (NIL (QUOTE OFF)
									 "Don't trust the cache")))
								TITLE ← "Value for UNSAFE.DEFAULT")))
					    (T T)
					    (OFF NIL)
					    (NIL DATUM)
					    NIL))
				(INSPECTW.REDISPLAY inspectw)))
	   (TRUST.CACHELIST (if (MENU set?menu)
				then
				 (change (FCACHE.GETPROP property)
					   (SELECTQ
					     (MENU (LOADTIMECONSTANT
						       (create MENU
								 ITEMS ←(QUOTE
								   ((T T 
			"Trust that files in the cache list are really present on the local disk")
								     (NIL (QUOTE OFF)
									  
		       "Verify that files in the cache list are really present on the local disk")))
								 TITLE ← "Value for TRUST.CACHELIST"))
						     )
					     (T T)
					     (OFF NIL)
					     (NIL DATUM)
					     NIL))
				 (INSPECTW.REDISPLAY inspectw)))
	   (SILENT (if (MENU set?menu)
		       then (change
				(FCACHE.GETPROP property)
				(SELECTQ (MENU (LOADTIMECONSTANT
						     (create MENU
							       ITEMS ←[QUOTE
								 (T (NIL (QUOTE OFF]
							       TITLE ← "Value for SILENT")))
					   (T T)
					   (OFF NIL)
					   (NIL DATUM)
					   NIL))
			      (INSPECTW.REDISPLAY inspectw)))
	   (UNSAFE (if (MENU set?menu)
		       then (change (FCACHE.GETPROP property)
					(SELECTQ (MENU
						     (LOADTIMECONSTANT
						       (create MENU
								 ITEMS ←(QUOTE
								   ((T T 
						     "Silently use the cache if a server is down")
								     (NOTIFY (QUOTE NOTIFY)
									     
				      "Tell the user when using the cache while a server is down")
								     (ASK (QUOTE ASK)
									  
				      "Ask the user whether to use the cache if a server is down")
								     (NIL (QUOTE OFF)
									  
							"Don't use the cache if a server is down")))
								 TITLE ← "Value for UNSAFE")))
						   (T T)
						   (ASK (QUOTE ASK))
						   (NOTIFY (QUOTE NOTIFY))
						   (OFF NIL)
						   (NIL DATUM)
						   NIL))
			      (INSPECTW.REDISPLAY inspectw)))
	   (NIL NIL)
	   (if (MENU set?menu)
	       then [change (FCACHE.GETPROP property)
				(MKATOM (PROMPTFORWORD ">" NIL NIL
							   (\FCACHE.PRINT.PROMPT
							     inspectw
							     (LIST (CONCAT "Enter the new " 
									       property 
									       " cache property")
								     
							"The expression read will be EVALuated. "]
		      (INSPECTW.REDISPLAY inspectw])

(\FCACHE.INSPECT.TITLEFN
  [LAMBDA (inspectw object)                                  (* smL "30-Jul-86 15:06")

          (* * The title was bugged in the inspectw)


    (SELECTQ [MENU (CONSTANT (create MENU
					     ITEMS ←(QUOTE ((ReFetch (QUOTE REFETCH)
								       "Recompute the inspect window"]
	       (REFETCH (\FCACHE.CLEAR.PROMPT.WINDOW inspectw)
			(INSPECTW.REDISPLAY inspectw))
	       (NIL NIL)
	       (SHOULDNT])

(\FCACHE.INSPECT.VALUES
  [LAMBDA (cachePropList property)                           (* smL " 7-Jul-86 15:25")

          (* * What is the property value)


    (FCACHE.GETPROP property])

(\FCACHE.PROPERTY.NAMES
  [LAMBDA NIL                                                (* smL " 7-Jul-86 14:54")

          (* * Return a list of all current cache properties)


    (BQUOTE (ENTRIES (\,@(for p on \FCACHE.PROPERTIES by (CDDR p) collect (CAR p)))
		       DEAD.HOSTS])
)
(DECLARE: EVAL@COMPILE DONTCOPY 
(FILESLOAD FILECACHE-DECLS TABLEBROWSERDECLS)
)
(PUTPROPS FILECACHE-BROWSER COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (1214 1721 (\FCACHE.FLUSH.INFOHOOK 1224 . 1719)) (1758 13086 (\FCACHE.BROWSE.CACHE 1768
 . 6395) (\FCACHE.BROWSE.COPYFN 6397 . 6659) (\FCACHE.BROWSE.PRINTFN 6661 . 7282) (
\FCACHE.BROWSE.RECOMPUTE 7284 . 8733) (\FCACHE.BROWSE.WHENSELECTEDFN 8735 . 13084)) (13087 13475 (
\FCACHE.CLEAR.PROMPT.WINDOW 13097 . 13473)) (16067 24211 (\FCACHE.INSPECT.PROPCOMMANDFN 16077 . 23197)
 (\FCACHE.INSPECT.TITLEFN 23199 . 23681) (\FCACHE.INSPECT.VALUES 23683 . 23886) (
\FCACHE.PROPERTY.NAMES 23888 . 24209)))))
STOP