I've heard people brag about 50 year old asparagus patches. It all depends upon your care and attention, I think. Give it a good top dressing/mulch of leaves and compost in the fall, fertilize in spring, water it lots when it's producing and don't EVER pick all the spears - only those fatter than a pencil - so it re-generates nice strong plants for next year.
Raspberries are different, I believe. Some types need some old canes removed every year, and produce berries on new canes. Everbearers I think will produce their first crop of new berries on last year's canes, then more berries on the new growth. So it also depends upon what type of raspberries you have. Again, great care will always help with longevity and production. All raspberries will benefit from soil amendments at least once a year. More is better.