Skip navigation

More About Offline Files

Work with network files even when you're not connected

In "Offline Files" (December 1999), I discussed Windows 2000's (Win2K's) offline files, which is a network caching feature. This month, I explain this feature in more detail.

The premise behind offline files is that computers can access their local hard disks more quickly than they can access files on a network server. Offline files creates a hidden folder named \winnt\csc on the system drive and keeps copies of files that you've accessed from the network in that directory. When you tell your system to access a file on a server, offline files first looks in the local directory to see whether you've accessed that file before; if so, offline files asks the server for the time, date, and size of the file. If those three values match the time, date, and size of the locally cached copy, offline files delivers the file from the local cache directory to you to save network bandwidth. When the network is down or not responding and you want to retrieve a file from the network, offline files lets you keep working because you can still access files in the cache. You're not aware that the file came from the cache because it appears to have come from the network. My Network Places (which is Network Neighborhood in Windows NT) still shows you servers and shares that it's aware of, but the only files My Network Places can deliver are files that you've previously accessed and that are therefore in the cache. If you want to save a file to a server that is down, offline files saves the file in its cache on the local hard disk and copies the file from its local cache to the intended server location when the server comes back online.

As I discussed last month, pinning a file (i.e., right-clicking the file and selecting Make Available Offline) forces the offline files feature to cache the file. In addition, you can specify a portion of disk space for offline files to cache files on its own. So, how do you find out which files are currently cached?

Win2K provides a user interface (UI) that helps you determine which files are cached. This UI lets you view the names of cached files. To access this interface, open My Computer, click the Tools menu, select Folder Options, and click the Offline Files tab in the property page that opens. On the Offline Files tab, which Screen 1, page 164, shows, you have two options for viewing which files are cached. One method is to select the Place shortcut to Offline Files folder on the desktop check box. Selecting this option places an icon on your desktop that you can open to see the list of cached files (as well as information such as the time and date of the file and whether it was pinned or cached automatically—pinned files are designated always available offline, whereas automatically cached files are designated temporarily available offline). The other way to see which files are cached is to click View Files on the Offline Files tab.

The Offline Files tab also controls several other functions. The tab lets you tell the system how much space to set aside for the files that it caches automatically. In addition, you can turn off the offline files function from the tab. Finally, the tab lets you control how offline files synchronizes files between the offline files folder and your network servers.

To understand how the offline files cache system works and the importance of synchronization, consider the following scenario. Suppose you open a file from a server. You work on the file and save and close it. The system writes that file twice—once to the server the file originally came from and once in the offline files folder. This process occurs immediately because offline files' caching functionality doesn't have delayed-write behavior, as NTFS's caching does. When you write a file to a server, the system always writes the file at that moment (except when you're not connected).

Suppose you return to the file 3 days later and open it from Microsoft Word. The network redirector software looks at the time, date, and file size of the copy in the local cache and compares these values with the time, date, and file size of the copy on the server. If the values match, the redirector gives Word the local copy. If the time, date, and file size don't match (e.g., someone else modified the file in the past 3 days), the redirector gets the latest version of the file from the server.

Although this process for obtaining files works, it could be better. After all, the idea behind caching is to offer better apparent network throughput. If the latest version of a file were already in the cache, you'd see that the local hard disk can offer a snappier response time than the network provides. For offline files to work best, you need to prestuff the cache with the latest versions of cached files. Synchronization accomplishes this task. Win2K offers several options for keeping the cache's contents fresh.

From My Computer, select Tools, Synchronize, and click Setup to see several synchronization options. The first option is logon/logoff, which configures file synchronization to occur at logon or logoff. I don't recommend this option because synchronizing files at logon or logoff extends the already-lengthy logon and logoff processes; you must wait while data transfers from the servers to your local cache, which is annoying. A better option is On Idle. This option tells your computer to synchronize files when you haven't touched the keyboard or mouse for a period of time that you specify. The third option is to configure synchronization to occur at preset times of the day.

Laptop users' synchronization needs differ from PC users' needs. Before you leave for a trip with your laptop in hand, you must be certain that the network files you need are in your cache (which you can do by pinning the files) and that you have the latest versions of the files (which you can do by configuring your laptop to synchronize when you log off). However, even if you ensure that you have up-to-date files when you leave, someone else might modify the same files on the network while you're away. When you return and try to put your modified files on the network (which occurs at the first synchronization), Win2K will notice the discrepancy. Rather than overwriting the file on the network with your file (and thus destroying someone's work), Win2K opens a dialog box that tells you about the conflict and lets you launch the application to examine your version of the file and the other person's version of the file. Then, you can overwrite the other person's version, discard your version, or save both versions under different names.

Although offline files is a great feature, I ran into one oddity that you might want to watch for. I sometimes create a new file by opening a network folder and right-clicking it to bring up the network folder's context menu. I then choose New and select a document type, which should create a blank document. In Win2K, this process sometimes doesn't work. The OS doesn't generate an error message; it just ignores me. However, the context menu's New option works if I turn off the offline files feature. This problem might occur only in the beta, but keep your eyes open for it.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish