diff --git a/core/api/src/main/java/org/onosproject/store/service/ConsistentMapBuilder.java b/core/api/src/main/java/org/onosproject/store/service/ConsistentMapBuilder.java
index b4251c6..847adaf 100644
--- a/core/api/src/main/java/org/onosproject/store/service/ConsistentMapBuilder.java
+++ b/core/api/src/main/java/org/onosproject/store/service/ConsistentMapBuilder.java
@@ -113,6 +113,17 @@
     ConsistentMapBuilder<K, V> withMeteringDisabled();
 
     /**
+     * Provides weak consistency for map gets.
+     * <p>
+     * While this can lead to improved read performance, it can also make the behavior
+     * heard to reason. Only turn this on if you know what you are doing. By default
+     * reads are strongly consistent.
+     *
+     * @return this ConsistentMapBuilder
+     */
+    ConsistentMapBuilder<K, V> withRelaxedReadConsistency();
+
+    /**
      * Builds an consistent map based on the configuration options
      * supplied to this builder.
      *
diff --git a/core/api/src/test/java/org/onosproject/store/service/TestConsistentMap.java b/core/api/src/test/java/org/onosproject/store/service/TestConsistentMap.java
index 8945137..3573230 100644
--- a/core/api/src/test/java/org/onosproject/store/service/TestConsistentMap.java
+++ b/core/api/src/test/java/org/onosproject/store/service/TestConsistentMap.java
@@ -247,6 +247,11 @@
         }
 
         @Override
+        public ConsistentMapBuilder<K, V> withRelaxedReadConsistency() {
+            return this;
+        }
+
+        @Override
         public ConsistentMapBuilder<K, V> withMeteringDisabled() {
             return this;
         }
diff --git a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/AsyncCachingConsistentMap.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/AsyncCachingConsistentMap.java
new file mode 100644
index 0000000..bbc703d
--- /dev/null
+++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/AsyncCachingConsistentMap.java
@@ -0,0 +1,56 @@
+package org.onosproject.store.consistent.impl;
+
+import java.util.concurrent.CompletableFuture;
+
+import org.onosproject.core.ApplicationId;
+import org.onosproject.store.service.Serializer;
+import org.onosproject.store.service.Versioned;
+
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+
+/**
+ * Extension of DefaultAsyncConsistentMap that provides a weaker read consistency
+ * guarantee in return for better read performance.
+ *
+ * @param <K> key type
+ * @param <V> value type
+ */
+public class AsyncCachingConsistentMap<K, V> extends DefaultAsyncConsistentMap<K, V> {
+
+    private final LoadingCache<K, CompletableFuture<Versioned<V>>> cache =
+            CacheBuilder.newBuilder()
+                        .maximumSize(10000) // TODO: make configurable
+                        .build(new CacheLoader<K, CompletableFuture<Versioned<V>>>() {
+                            @Override
+                            public CompletableFuture<Versioned<V>> load(K key)
+                                    throws Exception {
+                                return AsyncCachingConsistentMap.super.get(key);
+                            }
+                        });
+
+    public AsyncCachingConsistentMap(String name,
+            ApplicationId applicationId,
+            Database database,
+            Serializer serializer,
+            boolean readOnly,
+            boolean purgeOnUninstall,
+            boolean meteringEnabled) {
+        super(name, applicationId, database, serializer, readOnly, purgeOnUninstall, meteringEnabled);
+        addListener(event -> cache.invalidate(event.key()));
+    }
+
+    @Override
+    public CompletableFuture<Versioned<V>> get(K key) {
+        CompletableFuture<Versioned<V>> cachedValue = cache.getIfPresent(key);
+        if (cachedValue != null) {
+            if (cachedValue.isCompletedExceptionally()) {
+                cache.invalidate(key);
+            } else {
+                return cachedValue;
+            }
+        }
+        return cache.getUnchecked(key);
+    }
+}
\ No newline at end of file
diff --git a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DefaultConsistentMapBuilder.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DefaultConsistentMapBuilder.java
index 965791d..0e11794 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DefaultConsistentMapBuilder.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DefaultConsistentMapBuilder.java
@@ -39,6 +39,7 @@
     private boolean partitionsEnabled = true;
     private boolean readOnly = false;
     private boolean metering = true;
+    private boolean relaxedReadConsistency = false;
     private final DatabaseManager manager;
 
     public DefaultConsistentMapBuilder(DatabaseManager manager) {
@@ -90,6 +91,12 @@
         return this;
     }
 
+    @Override
+    public ConsistentMapBuilder<K, V> withRelaxedReadConsistency() {
+        relaxedReadConsistency = true;
+        return this;
+    }
+
     private void validateInputs() {
         checkState(name != null, "name must be specified");
         checkState(serializer != null, "serializer must be specified");
@@ -110,14 +117,25 @@
 
     private DefaultAsyncConsistentMap<K, V> buildAndRegisterMap() {
         validateInputs();
-        DefaultAsyncConsistentMap<K, V> asyncMap = new DefaultAsyncConsistentMap<>(
-                name,
-                applicationId,
-                partitionsEnabled ? manager.partitionedDatabase : manager.inMemoryDatabase,
-                serializer,
-                readOnly,
-                purgeOnUninstall,
-                metering);
-        return manager.registerMap(asyncMap);
+        Database database = partitionsEnabled ? manager.partitionedDatabase : manager.inMemoryDatabase;
+        if (relaxedReadConsistency) {
+            return manager.registerMap(
+                    new AsyncCachingConsistentMap<>(name,
+                        applicationId,
+                        database,
+                        serializer,
+                        readOnly,
+                        purgeOnUninstall,
+                        metering));
+        } else {
+            return manager.registerMap(
+                    new DefaultAsyncConsistentMap<>(name,
+                        applicationId,
+                        database,
+                        serializer,
+                        readOnly,
+                        purgeOnUninstall,
+                        metering));
+        }
     }
 }
\ No newline at end of file
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStore.java b/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStore.java
index 0b7c095..37d8a7f 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStore.java
+++ b/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStore.java
@@ -94,6 +94,7 @@
         configs = storageService.<ConfigKey, ObjectNode>consistentMapBuilder()
                 .withSerializer(Serializer.using(kryoBuilder.build()))
                 .withName("onos-network-configs")
+                .withRelaxedReadConsistency()
                 .build();
         configs.addListener(listener);
         log.info("Started");
