Remove tiny memory leak in error handling
Add leveldb LRU cache functionality