If you have a lot or don't anticipate using it in the next 5 days, then freeze it.
If it's already minced or pureed then simply measure it into quantities that will be the easiest for you to use and then freeze them on a tray lined with plastic wrap. Once frozen, remove and put into a self-sealing bag and keep in the freezer for future use.
Whole ginger can be frozen simply as it is. Just put it a bag in the freezer. Galangal for example, is commonly sold frozen in asian markets You can pull it out and grate what you need on a rasp style zester while frozen. I never even peel ginger as most uses for it require it to either be minced finely or strained out all together. A little gingerroot skin is just more fiber for the diet.
The temperature varies not by how long you want to keep the item, but by what you are dehydrating. Consider a carrot. A raw carrot will keep for literally months. A cooked one at room temperature will not even keep for days. So, when you're dehydrating carrots (for example to reduce the weight of the food you take camping) you want to be sure not to cook them in the process. Now, consider raw meat such as jerky. This has a LOT of water in it. If you dry it at too low a temperature, it will spoil before you have reduced the water content enough. Same for a fruit puree. But herbs, if you have it too hot you will draw out the flavours and just keep dehydrated dust.
My dehydrator came with a book telling me what temperatures to use for what products. There are also words on the temperature dial. This is a cropped shot of my model on the manufacturer's website:
While you can't read the words, they say "fruit", "vegetables" etc. The coolest temps are for herbs, then it goes raising bread, making yogurt, then dehydrating veg, then fruit, and finally jerky.
And just as you can't choose one temperature to use for dehydrating any and all food, nor can you assume one keeping time for any and all food. My book also tells me which things keep for months, and which for years. I don't think there's anything that will let your dried meat keep for years, but you should do ok with legumes and some vegetables.
Best Answer
As Lars Friedrich already wrote, curing with salt is a way to kill bacteria. A high sugar content and the removal of water in general alters the water activity.1
Some chemicals are toxic to bacteria (and to some extend also toxic to humans) like borax (which is used to preserve caviar; I'm not sure if it only inhibits the growth of bacteria) or ethanol (drinking alcohol). Sulfites are used - not exclusively - in wine making and on dried fruit.
You can alter the pH. I doubt the food will be edible as-it-is.
Last but not least you can irradiate the food to sterilize it. Irradiation is also commonly used to sterilize (disposable?) medical equipment.
Please note that freezing does not kill any bacteria.
Side note: There are some other bacteria that survive even in such adverse environments but they are not common as foodborne pathogens. If you really want to be sure that the food is sterile without cooking, you have pressure-sterilize, "poison" it or irradiate it.
You can also preserve food even with bacteria and fungi: A sourdough has an almost indefinitely shelf-live. It basically only consists of flour, water and a mix of many different bacteria and yeasts. Cultured milk also has a very long shelf life.
For further reading: The FAT TOM rule describes the six favorable conditions required for the growth of foodborne pathogens.
1 Caveat: (Botulinum) spores survive in honey. Do they count as bacteria?