1) Question: How does AppleShare 4.2.1 displace files from cache. When cache is full, does one users file get removed when another user opens a file?
Answer: The AppleShare 4.2.1 cache has been completely redesigned. From the administrator perspective memory is now managed as a single block of memory. There are no longer barriers between one user's portion of cache and any other users.
While the administrator views memory as a single block of memory, that may grow, AppleShare manages it in smaller pieces. It tries to keep as much data in cache as possible. Three things need to happen before a file (or a portion of a file) is displaced from the AppleShare cache:
* A read request must come for data not already in cache.
* AppleShare will attempt to expand the size of its cache.
* The cache expansion request does not succeed because either physical memory is exhausted, or because of the way the administrator has configured cache.
The cache scheme being used is called least recently used (LRU) which is fairly common. AppleShare examines its blocks of data, and data with the longest unused access time will be cleared out to make room for the new data coming from the disk.
2) Question: If numerous users open the same file, does that file get cached just once?
Answer: Yes, just once. That is the key to AppleShare's new performance. It now makes much better use of memory.
From the end user perspective security is still enforced, but assuming two user's both have access to the same file and are reading it at about the same time, it will only be read into memory once. If the file remains in memory and some time later another user requests the same file, no additional data will be read from disk (since it is already in the cache), this user will get the data more quickly than the first requestor.
Now a heavily used file may end up staying in the cache indefinitely on a server with plenty of memory.
3) Question: Any difference in icon and folder caching?
Answer: There are no significant difference that we are aware of. The data elements are smaller than for regular stored data. This means you can keep more of them in a block.