use flag + set cache to no more than 2GB
todos + use bloom filter