anchor.diff:          
       let tryEvent (key:Guid) values =
           async { 
  -            use session = documentStore.OpenAsyncSession()
  -
               let docKey = "MyCountingDocs/" + key.ToString()
   
               let buildNewDoc () =
  
positive.code:                 (newDoc, etag)
  
              let! (doc, etag) = 
                  getDocument docKey session cache
                  |> Async.map (Option.getOrElseF buildNewDoc)
  
              let (complete, wait) = getPromise()
  
negative.code: 
      let writeQueue = new WorktrackingQueue<unit, BatchWrite>((fun _ -> Set.singleton ()), writeBatch, 10000, 10) 
  
      let getDocument key (documentStore : Raven.Client.IDocumentStore) (cache : MemoryCache) =
          let cacheEntry = cache.Get(key)
          match cacheEntry with
          | :? ProjectedDocument as doc ->
              async { return Some doc }
          | _ -> 
              async {
                  use session = documentStore.OpenAsyncSession()
                  let! doc = session.LoadAsync<MyCountingDoc>(key) |> Async.AwaitTask
                  if (doc = null) then
                      return None
  