My understanding is that the LoadingCache will deal with doing the cache.put of the return value of databaseLoad. I preserved the original behavior of databaseLoad not doing a cache.put on the requested key. I'll add a comment to the code, it's not immediately obvious why we do the continue

Sent from my iPhone

> On Nov 18, 2013, at 7:45 AM, Gary Dusbabek <notifications@github.com> wrote:
> 
> In blueflood-core/src/main/java/com/rackspacecloud/blueflood/cache/MetadataCache.java:
> 
> > @@ -161,7 +162,14 @@ public void databasePut(Locator locator, String key, Object value) throws CacheE
> >      // implements the CacheLoader interface.
> >      public Object databaseLoad(Locator locator, String key) throws CacheException {
> >          try {
> > -            Object value = AstyanaxReader.getInstance().getMetadataValue(locator, key);
> > +            Map<String, Object> metadata = AstyanaxReader.getInstance().getMetadataValues(locator);
> > +            for (Map.Entry<String, Object> meta : metadata.entrySet()) {
> > +                if (meta.getKey().equals(key)) continue;
> > +                CacheKey cacheKey = new CacheKey(locator, meta.getKey());
> > +                cache.put(cacheKey, meta.getValue());
> > +            }
> > +
> > +            Object value = metadata.get(key);
> Should we do anything to limit the effect of misses? If I understand this change, multiple misses will cause the cache to be continually reloaded.
> 
> —
> Reply to this email directly or view it on GitHub.