title: Cache a set of strings with LRU eviction policy in Java
body: <p>I am trying to create a cache for a set of Strings with LRU eviction policy in this way.</p>
  
  <pre><code>private static final Boolean PLACEHOLDER = true;
  LoadingCache&lt;String, Boolean&gt; scannedIDsCache = CacheBuilder.newBuilder()
          .build(new CacheLoader&lt;String, Boolean&gt;() {
              @Override
              public Boolean load(String key) throws Exception {
                  return PLACEHOLDER;
              }
          });
  </code></pre>
  
  <p>I think I am saving space using only one object as the value for all the elements, am I correct? Do you know any other space efficient way of doing this? Thanks.</p>