anchor.diff:  
           member x.TryCompileProgram(id : string, signature : IFramebufferSignature, code : Lazy<GLSL.GLSLShader>) : Error<_> =
               codeCache.GetOrAdd((x, id, signature), fun (x, id, signature) ->
  -
  -                let key = 
  -                    {
  -                        device      = x.Driver.vendor + "_" + x.Driver.renderer + "_" + string x.Driver.version
  -                        id          = id
  -                        outputs     = signature.ColorAttachments |> Map.toList |> List.map (fun (id,(name, s)) -> string name, (id, s.format)) |> Map.ofList
  -                        layered     = signature.PerLayerUniforms
  -                        layerCount  = signature.LayerCount
  -                    }
  -
  -                let hash = shaderPickler.ComputeHash(key).Hash |> System.Guid
  -                let file = System.IO.Path.Combine(cachePath, string hash + ".bin")
  -
  -                let content : Option<ShaderCacheEntry> =
  -                    if System.IO.File.Exists file then
  -                        try shaderPickler.UnPickle (File.readAllBytes file) |> Some
  -                        with _ -> None
  +                
  +                let (file : string, content : Option<ShaderCacheEntry>) =
  +                    if useDiskCache then
  +                        let key = 
  +                            {
  +                                device      = x.Driver.vendor + "_" + x.Driver.renderer + "_" + string x.Driver.version
  +                                id          = id
  +                                outputs     = signature.ColorAttachments |> Map.toList |> List.map (fun (id,(name, s)) -> string name, (id, s.format)) |> Map.ofList
  +                                layered     = signature.PerLayerUniforms
  +                                layerCount  = signature.LayerCount
  +                            }
  +
  +                        let hash = shaderPickler.ComputeHash(key).Hash |> System.Guid
  +                        let file = System.IO.Path.Combine(cachePath, string hash + ".bin")
  +
  +                        if System.IO.File.Exists file then
  +                            try file, shaderPickler.UnPickle (File.readAllBytes file) |> Some
  +                            with _ -> file, None
  +                        else
  +                            file, None
                       else
  -                        None
  +                        "", None
   
                   match content with
  -                    | Some c when false ->
  +                    | Some c ->
                           
                           let prog = GL.CreateProgram()
                           GL.ProgramBinary(prog, c.format, c.binary, c.binary.Length)
  
positive.code:     let private codeCache = ConcurrentDictionary<Context * string * IFramebufferSignature, Error<FShade.GLSL.GLSLProgramInterface * Program>>()
      let private shaderCache = ConcurrentDictionary<Context * Surface * IFramebufferSignature, Error<FShade.GLSL.GLSLProgramInterface * IMod<Program>>>()
      let private shaderPickler = MBrace.FsPickler.FsPickler.CreateBinarySerializer()
      let private cachePath =
          let temp = Path.combine [System.IO.Path.GetTempPath(); "aardvark-gl-shadercache"]
          if not (System.IO.Directory.Exists temp) then System.IO.Directory.CreateDirectory temp |> ignore
          temp
  
      type private OutputSignature =
          {
  
negative.code:                         let program =
                              {
                                  Context = x
                                  Code = c.code
                                  Handle = prog
                                  Shaders = []
                                  SupportedModes = c.modes
  
                                  // deprecated stuff
                                  UniformGetters = SymDict.empty
                                  Interface = ShaderReflection.ShaderInterface.empty
                                  TextureInfo = Map.empty
                              }
  