Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am planning to build a network attached storage (NAS) server.

Is there a way to cache frequently acccessed files from the remote storage automatically on the local PC?

(I am not looking for a way to sync whole folders like rsync, but rather something that automatically and transparently caches the last accessed 50 gb of files.)

Ideally I am searching for something that caches writes as well as reads, since only one pc will be accessing the server (and one day of lost changes if the local cache is damaged would be acceptable)

I looked into windows offline files, but as far as I could tell this requires manual interaction to disconnect the server or go into offline mode in order to use the cache.

The server would probably be running Linux or freeNAS, the pc runs Windows xp, but could be upgraded to 7 if required.

share|improve this question
up vote 2 down vote accepted

You and Zlatev are on the right track with Offline Files. Your NAS has to run Windows. Under the Group Policies, you'll want to configure "Slow Link Mode." Just jack the setting up to like 999999 Kbps. This essentially forces all reads and writes to the local cache. Under Slow Link, windows will only sync about once every two minutes. Also you should probably turn off the balloon reminders. They popup initially to tell you, "Hey, you are offline! We are reading and writing stuff from local cache now!!!" Durrrrrr.

On the client side, you want to turn on "automatically cache files." It automatically caches every network file you access through that UNC path, up to 25% of your disk space. That can be adjusted too.

If you have multiple folders to share and your server is using either Linux or Vista/7, then just create a dummy share folder and hardlink all the folders you want to share to that one.

Lastly, I highly recommend that you at least upgrade the client to Vista. One of Vista's improvements was differential block writes. Only the changed parts of a file are sent back to the server. Also, the Vista/7 offline files (technically called Client Side Caching) is vastly more reliable. On the server side, all it has to do is update to the latest changes in the SMB protocol. In fact, all it has to do is use SMB. So all this is possible using any network share, as long as the server end supports SMB.

Here are some technet articles.

share|improve this answer

I am not sure, but possibly Windows Shared Folders Offline Availability/BranchCache might let you to do something similar. Some info here -

share|improve this answer
BranchCache has nothing to do with that. Offline Folders have to be selected by the user, so there is no cache effect. ;-) – DiableNoir Jun 21 '11 at 16:24
Actually, branch cache can be set to cache everything in windows 7 pro (tested and used!) – galinette Mar 9 '15 at 20:54

I am looking into the same problem. On a Mac, my idea was to use rsync in combination with a script. The job of the script is to decide which files to sync/cache. Rsync then just executes efficiently on this towards the network share. So if we for example want a 5GB cache, removing least recently used, we'd need to program a script that outputs a file list corresponding to the "5GB most recently used files", and have rsync sync it locally and deleting any files in the cache that is no longer in that list.

It needs to be setup very carefully though, as the risk of messing up is big!

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .