Stirring constantly at medium-low heat, bring everything other than the extract to a gentle boil.
Cook until it thickens, around 5 minutes once it reaches a gentle boil.
Add the optional extract, turn off the heat, keep stirring another minute.
Remove from heat, and let cool to at most 130F before putting in a jar and refrigerating until cold.