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.22.4
+### Fixed
+- Cache now prunes correctly.
+
 ## 0.22.3
 ### Fixed
 - Bug was making cache get stuck when pruning.
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: c8bf74e00554aae1150db4899a8a884aa02460f8ceee92438039b164087e4cab
+-- hash: 4792e70aaa8e9b47c7367de22ef0739cf5538f5c878468351f030e037658f560
 
 name:           haskoin-store
-version:        0.22.3
+version:        0.22.4
 synopsis:       Storage and index for Bitcoin and Bitcoin Cash
 description:    Store and index Bitcoin or Bitcoin Cash blocks, transactions, balances and unspent outputs.
                 All data is available via REST API in JSON or binary format.
diff --git a/src/Haskoin/Store/Cache.hs b/src/Haskoin/Store/Cache.hs
--- a/src/Haskoin/Store/Cache.hs
+++ b/src/Haskoin/Store/Cache.hs
@@ -841,7 +841,9 @@
         txsetcount <- Redis.del [txSetPfx <> encode xpub]
         utxocount <- Redis.del [utxoPfx <> encode xpub]
         balcount <- Redis.del [balancesPfx <> encode xpub]
+        x <- Redis.zrem maxKey [encode xpub]
         return $ do
+            _ <- x
             addrs' <- addrcount
             txset' <- txsetcount
             utxo' <- utxocount
