If you’ve had dengue recently, this may stop you from getting the infection again for the next two or three months. But this protection does not necessarily last in the longer term.
In general, when you get an infection, your body remembers it. This means if you get the infection again, your body deals with it faster. Vaccines work in the same way – by showing your body what a particular virus or bacteria is like, you’re more likely to be ready to fight it in the future.