The default is ~/.cache/bazel so it is available after reboot.
You can add an extra cache with:
https://docs.bazel.build/versions/main/remote-caching.html#disk-cache 8
But you need to consider also the cache invalidation effect of large regular changes like this one:

  
    
    
    LLVM updates and bazel cache Build
  
  
    As we are updating LLVM two times at day I’ve tried to query bazel with: 
bazel aquery  "rdeps(//tensorflow:*,//third_party/llvm:*)" --include_aspects 2>/dev/null | grep Compiling | wc -l 
I am not a bazel ninja so probably the query could be wrong or improved but I currently see 9938 files on master (CPU only). 
What is the effect of this bi-daily rolling update on the average community contributor compiling workflow/environment and his bazel cache?
  


More in general you could be interested in:

  

      github.com/tensorflow/build
  

  
    
  
	  
  

  
    
      Provide Bazel cache for TensorFlow builds 6
    

    
      
        opened 
        
          
        
        May 15, 2020
      
      


      
        
          
          angerson
        
      
    

    
    
  


  
    Providing a TensorFlow build cache could be very helpful to external developers,… and lower the barrier to entry of contributing to TF.

Some ideas for this we've discussed before are:

- Offer [Bazel RBE](https://docs.bazel.build/versions/master/remote-execution.html) resources on behalf of SIG Build. This service is in alpha on GCP.
- Provide a read-only [build cache](https://docs.bazel.build/versions/master/remote-caching.html#google-cloud-storage) in a GCP bucket.
- Provide `devel_cache` Docker images containing a build cache (these could be very large)
- Provide code-and-cache volumes for the docker `devel` images.

See also:

- https://github.com/tensorflow/tensorflow/issues/39560
- https://github.com/tensorflow/tensorflow/issues/4116
- https://github.com/tensorflow/addons/issues/1414