Investing in Treasury Inflation-Protected Securities (TIPS) is one way to ensure your safe investments keep up with inflation (at least as measured by the CPI). You can buy TIPS directly through TreasuryDirect.gov. You can also buy TIPS mutual funds and Exchange Traded Funds (ETFs). This Seeking Alpha article
reviews some TIP ETFs and the issue of using these to hedge against inflation. One downside with any bond fund is that they price will go down as interest rates rise. Shorter maturities are typically less sensitive to interest rate changes.