The recommended way to do this is to use PropertyBag (key/value pairs) through the Properties of SPFarm, SPSite.RootWeb (for root site of site collections), SPWeb, SPList etc (depending upon the scope that you need).
Managing Custom Configuration Options for a SharePoint Application
Update code example:
// ...inside web app feature activation code
SPWebApplication webApp = (SPWebApplication)properties.Feature.Parent;
string existingValue = ... //get existing value from menu
// reference property later
string savedProperty = webApp.Properties["settingkey"];
Accessing SPWeb.Properties was just as easy except that I referenced the web application differently. Since the feature is scoped to the web, the Feature.Parent will be an SPWeb instance instead of SPWebApplication. Follow this pattern instead.
SPWeb web = (SPWeb)properties.Feature.Parent;