Living in the cache, part 4

  • I saw this question over on the discussion groups:

  • "Some time back
    you posted that you lost access to your "real" notebook and were working exclusively in the cache.  Then I think something happened to your real notebook.
    I was just in a situation where I was offline but I told OneNote to "move" the notebook.  That is, I right-clicked on the notebook and chose "properties" and changed the location.  OneNote then recreated the notebook, it didn't seem to need an original copy. 
    Was this a different situation? "

  • I think "youbetcha" was referring to my experience when my hard drive died:

  • https://blogs.msdn.com/johnguin/archive/2008/03/07/still-living-in-the-onenote-cache.aspx. I had a notebook on a shared folder on the drive on my tablet and had opened it from several machines. "Youbetcha's" experience is different.

  • Going along with this is a question that comes up now and then: "Something happened and I lost my notebook - now what do I do?" The typical answer here is to click File | Open Backup and get the most recent backup copy.

  • One way of looking at how OneNote stores notebooks is from the "files on the hard drive" perspective. Here's how I typically view it.

  • "Me" for this diagram means the view I see on my screen of the section I am working on. And I drew the cache file with a thick border since it has more than just the section I am working on - it has a cache of all the notebooks I have open.

  • The first thing to notice is that I, as a user, don't work directly against the .ONE file on the drive. I only work against the cached copy of the section. This is different than an application like Word, for instance, in which I would work directly against a document. So any changes I make (like typing this sentence in OneNote) would get saved to the cache first, then to the actual .ONE file later. [More on what "later" means is below.] And since the cache contains a complete mirror image of the .ONE file, I can confidently make changes knowing what the "real" data is.

  • One of the advantages this system provides is that I can store my .ONE file anywhere. It can be on the same hard drive my computer has, on a removable thumb drive, sharepoint site - in short, anywhere I can access a file. Going back to my original hard drive failure, the .ONE file I had been using was on a different computer, and I lost access due to a hardware failure. Any failure in communications between my computer and the file would have resulted in the same condition - a network error, the wireless network goes down, network cable gets unplugged, etc… As a OneNote user, though, the worst I would notice is my icon on the shared folder would turn red until it could sync my changes again. You can see this yourself easily on most laptops if you have a shared notebook - just turn off your wireless connection for a little bit. Or, click the green icon to the right of the notebook name and you can set OneNote to work offline:

  • And then click this button:

  • Now you will see a red "offline" icon, but you can still edit your notes:

  • Your changes will sync back to the original .ONE file when you go back online. This makes my earlier statement about how often OneNote syncs (every 10 minutes is a typical answer) moot in some cases. If you need to sync NOW, you can always either click the "Sync Now" button to sync all notebooks, or press F9. SHIFT+F9 will sync the current section.

  • The .ONE backup files are made once per day, but you can change that in Tools | Options | Backup:

  • To put a test look into this, ensuring the data in the cache is critical, and that it replicates to the .ONE file is critical. We need to ensure this happens with all manner of configurations, and test with all errors conditions which may block those lines of communication.

  • Winding this up brings us back to Youbetcha's question - did he experience the same condition? The answer is mostly no - he changed the notebook's location, and did not lose the connection to it. If he moved it to a shared location, he may experience a loss of connectivity to it and would wind up "living in the cache" until he restored his connectivity.

  • Questions, comments, concerns and criticisms always welcome,

  • John