Posted tagged ‘HTTP’

WebDrive for Windows – Caching Explained

August 7, 2009

In order to provide quicker directory browsing and file editing, WebDrive caches both directory listings and files that are accessed on the server.

Some applications require that a file be cached on the local computer so that the application can access the file, for example, Word or MediaPlayer. Protocols like FTP and WebDAV do not provide for random file access, i.e., the capability to seek to a location within a file and read or write a small byte-range of data. However, Windows applications expect to be able to perform random access on a file. Therefore, when WebDrive receives a request from the file system to read a section of a file, it will download the entire file into the cache so that the Windows application will have full access to its contents.

One issue that can arise with caching is what happens if the file in the cache is out of date with what is on the server. Once a directory listing is cached by WebDrive, depending on your cache mode, you may not be able to see files in a folder that were uploaded by another user. Also, a file that was previously cached may be out of date if another user edited the file on the server. This is where the various caching modes of WebDrive can address these concerns.

Cache Modes

Single-User – In Single-User mode, WebDrive will act as if you are the only user accessing the server. This means that once a directory listing or file is cached, WebDrive will assume that the file is up to date. If a remote user uploads a new file to a folder on the server that was already cached by WebDrive, then the WebDrive user browsing the server in Explorer will not see the file unless they manually flush the cache. This cache mode provides the best performance and is the default mode selected after installation.

Multi-User – In Multi-User mode, WebDrive will “validate” files and listings that are cached with the server when they are accessed on the local system. This ensures that you are always seeing up-to-date directory listings and files. The drawback to this mode is that the validating process does take some time; however, it is fairly efficient, especially for SFTP and HTTP protocols. If you are using FTP, this cache mode can be problematic because most FTP servers do not have a way of reporting the modified time for a single file listing.

Custom – In Custom mode, you can fine-tune how and when files are validated with the server. The option Expire cached files after (X) seconds can be used when your server is unable to determine or report a files modified time. When this option is enabled, WebDrive will simply assume that after X seconds have passed, a cache file will be considered invalid and a new one will be downloaded from the server. This setting should only be used for FTP servers or special circumstances where determining the files modified time is not possible.

None – If you select None as your cache mode, files will always be downloaded from the server when accessed. A file in the cache will not be considered valid. When enabled, this mode is very slow and not recommended. In order to provide random access to applications, WebDrive must still cache files; however, once the application closes the file it will be marked invalid in the cache and downloaded again on the next access.

For more information on WebDrive caching and troubleshooting, see the WebDrive User’s Guide.