def readCachedFileContent(filename, mode='rb'):
 if (filename not in kb.cache.content):
  with kb.locks.cache:
   if (filename not in kb.cache.content):
    checkFile(filename)
    with openFile(filename, mode) as f:
     kb.cache.content[filename] = f.read()
 return kb.cache.content[filename]

def readCachedFileContent ( filename , mode = 'rb' ) : if ( filename not in kb . cache . content ) : with kb . locks . cache : if ( filename not in kb . cache . content ) : checkFile ( filename ) with openFile ( filename , mode ) as f : kb . cache . content [ filename ] = f . read ( ) return kb . cache . content [ filename ]
cached reading of file content .