static public File getCacheFile ( String fileLocation ) { File f = new File ( makeCachePath ( fileLocation ) ) ; if ( f . exists ( ) ) { if ( ! f . setLastModified ( System . currentTimeMillis ( ) ) ) logger . warn ( "Failed to setLastModified on " + f . getPath ( ) ) ; } if ( ! checkExist ) { File dir = f . getParentFile ( ) ; if ( ! dir . exists ( ) && ! dir . mkdirs ( ) ) logger . warn ( "Failed to mkdirs on " + dir . getPath ( ) ) ; checkExist = true ; } return f ; }
Get a file in the cache . File may or may not exist . We assume its always writeable . If it does exist set its LastModifiedDate to current time .