diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
 
+## 0.21.5
+### Added
+- Only store xpubs in cache if they have more than a threshold addresses used.
+
 ## 0.21.4
 ### Fixed
 - Fix shared cache case where head is set beyond header chain by another node.
diff --git a/app/Main.hs b/app/Main.hs
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -52,6 +52,7 @@
     , configTimeouts  :: !Timeouts
     , configRedis     :: !Bool
     , configRedisURL  :: !String
+    , configRedisMin  :: !Int
     }
 
 defPort :: Int
@@ -76,6 +77,9 @@
 defTimeouts :: Timeouts
 defTimeouts = Timeouts {blockTimeout = 7200, txTimeout = 600}
 
+defRedisMin :: Int
+defRedisMin = 100
+
 config :: Parser Config
 config = do
     configDir <-
@@ -148,6 +152,12 @@
     configRedisURL <-
         strOption $
         metavar "URL" <> long "redis" <> help "URL for Redis cache" <> value ""
+    configRedisMin <-
+        option auto $
+        metavar "MINADDRS" <> long "cachemin" <>
+        help "Minmum xpub address count to cache" <>
+        showDefault <>
+        value defRedisMin
     pure
         Config
             { configMaxLimits = MaxLimits {..}
@@ -211,6 +221,7 @@
            , configTimeouts = tos
            , configRedis = redis
            , configRedisURL = redisurl
+           , configRedisMin = cachemin
            } =
     runStderrLoggingT . filterLogger l $ do
         $(logInfoS) "Main" $
@@ -232,6 +243,7 @@
                             , storeConfPublisher = pub
                             , storeConfCache = maybecache
                             , storeConfGap = maxLimitGap limits
+                            , storeConfCacheMin = cachemin
                             }
                  in withStore scfg $ \st ->
                         let crcfg =
@@ -267,7 +279,7 @@
                     if null redisurl
                         then return defaultConnectInfo
                         else case parseConnectInfo redisurl of
-                                 Left e -> error e
+                                 Left e  -> error e
                                  Right r -> return r
                 cachembox <- newInbox
                 withRunInIO $ \r ->
diff --git a/haskoin-store.cabal b/haskoin-store.cabal
--- a/haskoin-store.cabal
+++ b/haskoin-store.cabal
@@ -4,10 +4,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: 5d2420570a90418f4e6d3bacfad7ad4322d1f833803722530d53417acf035e02
+-- hash: 9bff1adfaf74aaf3153599679243ab87120bbe1bbd3480d7ce1545f66a3c50f8
 
 name:           haskoin-store
-version:        0.21.4
+version:        0.21.5
 synopsis:       Storage and index for Bitcoin and Bitcoin Cash
 description:    Store blocks, transactions, and balances for Bitcoin or Bitcoin Cash, and make that information via REST API.
 category:       Bitcoin, Finance, Network
diff --git a/src/Haskoin/Store.hs b/src/Haskoin/Store.hs
--- a/src/Haskoin/Store.hs
+++ b/src/Haskoin/Store.hs
@@ -76,6 +76,8 @@
       -- ^ Redis cache configuration
         , storeConfGap       :: !Word32
       -- ^ gap for extended public keys
+        , storeConfCacheMin  :: !Int
+      -- ^ minimum number of addresses for caching
         }
 
 withStore ::
@@ -143,6 +145,7 @@
                             , cacheWriterChain = c
                             , cacheWriterMailbox = snd cacheinfo
                             , cacheWriterNetwork = storeConfNetwork cfg
+                            , cacheWriterMin = storeConfCacheMin cfg
                             }
                     cw =
                         withDatabaseReader
diff --git a/src/Network/Haskoin/Store/CacheWriter.hs b/src/Network/Haskoin/Store/CacheWriter.hs
--- a/src/Network/Haskoin/Store/CacheWriter.hs
+++ b/src/Network/Haskoin/Store/CacheWriter.hs
@@ -53,7 +53,7 @@
                                                          XPubBal (..),
                                                          XPubSpec (..),
                                                          XPubUnspent (..),
-                                                         sortTxs,
+                                                         nullBalance, sortTxs,
                                                          xPubAddrFunction,
                                                          xPubBals, xPubTxs,
                                                          xPubUnspents)
@@ -80,6 +80,7 @@
         , cacheWriterChain   :: !Chain
         , cacheWriterMailbox :: !CacheWriterInbox
         , cacheWriterNetwork :: !Network
+        , cacheWriterMin     :: !Int
         }
 
 type CacheWriterT = ReaderT CacheWriterConfig
@@ -143,9 +144,11 @@
     -> CacheWriterT m ()
 newXPubC xpub = do
     empty <- null <$> runCacheReaderT (cacheGetXPubBalances xpub)
+    x <- asks cacheWriterMin
     when empty $ do
         bals <- lift $ xPubBals xpub
-        go bals
+        let l = length (filter (not . nullBalance . xPubBal) bals)
+        when (x <= l) (go bals)
   where
     go bals = do
         utxo <- lift $ xPubUnspents xpub Nothing 0 Nothing
diff --git a/test/Haskoin/StoreSpec.hs b/test/Haskoin/StoreSpec.hs
--- a/test/Haskoin/StoreSpec.hs
+++ b/test/Haskoin/StoreSpec.hs
@@ -98,6 +98,7 @@
                         , storeConfPublisher = pub
                         , storeConfCache = Nothing
                         , storeConfGap = gap
+                        , storeConfCacheMin = 100
                         }
             withStore cfg $ \Store {..} -> withSubscription pub $ \sub ->
                 lift $
