Code example for Cache

Methods: getIfPresent

0
      return null; 
    Cache<String, String> tableCache = cache.get(table);
    if (tableCache == null)
      return null; 
    final String key = key(hashKey, rangeKey);
    return tableCache.getIfPresent(key);
  } 
 
  @Override 
  public void remove(String table, Object hashKey, Object rangeKey) {
    if (!enabled)
      return; 
    Cache<String, String> tableCache = cache.get(table);
    if (tableCache != null) {
      final String key = key(hashKey, rangeKey);
      tableCache.invalidate(key);
    } 
  } 
 
  @Override