code: def check_info_validity(self):
      
      cache_info = self.get_json('info')
      if not cache_info:
        return
  
      fresh_info = self.vol._fetch_info()
  
      mismatch_error = ValueError("""
        Data layer info file differs from cache. Please check whether this
        change invalidates your cache. 
  
        If VALID do one of:
        1) Manually delete the cache (see location below)
        2) Refresh your on-disk cache as follows:
          vol = CloudVolume(..., cache=False) # refreshes from source
          vol.cache = True
          vol.commit_info() # writes to disk
        If INVALID do one of: 
        1) Delete the cache manually (see cache location below) 
        2) Instantiate as follows: 
          vol = CloudVolume(..., cache=False) # refreshes info from source
          vol.flush_cache() # deletes cache
          vol.cache = True
          vol.commit_info() # writes info to disk
  
        CACHED: {cache}
        SOURCE: {source}
        CACHE LOCATION: {path}
        """.format(
        cache=cache_info, 
        source=fresh_info, 
        path=self.path
      ))
  
      try:
        fresh_sizes = [ scale['size'] for scale in fresh_info['scales'] ]
        cache_sizes = [ scale['size'] for scale in cache_info['scales'] ]
      except KeyError:
        raise mismatch_error
  
      for scale in fresh_info['scales']:
        del scale['size']
  
      for scale in cache_info['scales']:
        del scale['size']
  
      if fresh_info != cache_info:
        raise mismatch_error
  
      if fresh_sizes != cache_sizes:
        warn("WARNING: Data layer bounding box differs in cache.\nCACHED: {}\nSOURCE: {}\nCACHE LOCATION:{}".format(
        cache_sizes, fresh_sizes, self.path
        ))
docs: ValueError if cache differs at all from source data layer with
      an excepton for volume_size which prints a warning.