Fix small leak in event history
cacheSize===0 in config => dont use storage/cache at all