The idea of "extending" player's contracts is not the easy solution some think it is. It takes both parties to agree to extend a contract. The players and their agents are not dumb. They see what can happen in free agency. If a player is good, he will want to test the market. Who thought RJF would be able to sign what he signed for? Why would Crabtree sign an extension unless it was close to what Wallace signed for?
Besides, the 49ers have shown that loyalty is a one-sided street. A long contract means nothing if you get hurt. You will probably be cut before you are able to receive the benefits of the remaining years on your contract. The salary cap was simply designed to keep strong teams from getting too strong.