Add memory management handler to clear cache on memory warnings.