Tag Archives: Google

Using Java 8 Lambdas with Google Guava Caches

With Guava, you can define a simple in-memory cache with import static java.util.concurrent.TimeUnit.DAYS; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; Cache cache = CacheBuilder.newBuilder() .maximumSize(100000) .expireAfterAccess(7, DAYS) .build(); With this you can use .put(K, V) to load values, and .getIfPresent(K), which returns null if the key isn’t present. Sometimes it’s more convenientĀ to use get(K key, Callable<? extends V> […]

How to remove iGoogle

To remove iGoogle and revert to the classic vanilla google homepage, click “Classic Home” in the upper right corner of the screen.