net: customize memory cache size

Change-Id: I2b7cc83707a567676550be2639095c5bb28dc6dc