boolean useWriteCache(String name,IOContext context){
  if (!blockCacheWriteEnabled || name.startsWith(IndexFileNames.PENDING_SEGMENTS)) {
    return false;
  }
  if (blockCacheFileTypes != null && !isCachableFile(name)) {
    return false;
  }
switch (context.context) {
case MERGE:
{
      return false;
    }
default :
{
    return true;
  }
}
}

boolean useWriteCache ( String name , IOContext context ) { if ( ! blockCacheWriteEnabled || name . startsWith ( IndexFileNames . PENDING_SEGMENTS ) ) { return false ; } if ( blockCacheFileTypes != null && ! isCachableFile ( name ) ) { return false ; } switch ( context . context ) { case MERGE : { return false ; } default : { return true ; } } }
determine whether write caching should be used for a particular file / context .
