private void persistCache ( String projectName , String projectVersion , Map < String , String > cache ) { File cacheFile = new File ( getCacheDir ( ) , projectName + "/" + projectVersion ) ; ObjectOutputStream oos = null ; try { oos = new ObjectOutputStream ( new FileOutputStream ( cacheFile ) ) ; oos . writeObject ( cache ) ; } catch ( IOException ioe ) { LOGGER . warn ( "Unable to create the cache file {}/{}/{}" , getCacheDir ( ) . getAbsoluteFile ( ) , projectName , projectVersion ) ; } finally { if ( oos != null ) { try { oos . close ( ) ; } catch ( IOException ioe ) { } } } }
Persist a specific cache