Normally, Firefox determines the memory cache usage dynamically based on the amount of available memory. To specify a specific amount of memory cache, use about:config to add the Intefer preference browser.cache.memory.capacity, and set the value:
-1
(default) Determine the amount of memory cache dynamically.
0
None.
n
Memory capacity in kilobytes. For example: 4096.

To disable the memory cache completely, use about:config to set the preference browser.cache.memory.enable to false.