While the cabbage is salting for 2 hours, and in between the times you’re turning it over, you can make the porridge:
Combine the water and the sweet rice flour in a small pot. Mix well with a wooden spoon and let it cook over medium heat for about 10 minutes until it starts to bubble. Add the sugar and cook 1 more minute, stirring. Remove from the heat and let it cool off completely.
Pour cooled porridge into a large mixing bowl. Add garlic, ginger, onion, fish sauce, fermented salted shrimp, and hot pepper flakes. Mix well with the wooden spoon until the mixture turns into a thin paste.