Removed cash flushing, tested memory usage. Seems stable even without flushing.
Have to conduct further tests.