static StorageCache initCache ( Configuration configuration ) { if ( configuration . getBoolean ( Configuration . CACHE_ENABLED ) && configuration . getLong ( Configuration . CACHE_BYTES ) > 0 ) { return new StorageCache ( configuration ) ; } else { return new DisabledCache ( ) ; } }
Factory to create and initialize the cache .