A hydrocele, if not treated on time, can cause fluid to collect in the scrotum leading to swelling. This swelling increases your risk of getting hernia.