public static < F , T > Function < F , T > cache ( @ javax . annotation . Nonnull final Function < F , T > inner ) { @ javax . annotation . Nonnull final LoadingCache < F , T > cache = CacheBuilder . newBuilder ( ) . build ( new CacheLoader < F , T > ( ) { @ Override public T load ( final F key ) throws Exception { return inner . apply ( key ) ; } } ) ; return cache :: apply ; }
Cache function .