Normally, the life of compact digital depends how you use your camera. CCD or CMOS sensor is the main concern for the cost of repairing ( at least $ 100 for replacement ). When expose the camera to the extreme weather & lighting, dusty environment, improver storage, humidity, and improperly camera handling, life of camera and camera's CCD or CMOS sensor quickly gets worn out. My Canon S-40 has been very good for taking pictures for the past 3 years. But,noticable, the pictures - taken during the first year - are slightly better than that - taken recently.
No digital camera seems to last longer than 5 year, disclosed by some experts. The newer model and better features always come up. Shutter life is also another concern. Unlike film cemera ( in which the shutter life endures more than 200,000 shots ), digital camera's shutter doesn't seems to last that long ( normally after 20,000-50,000 shots or so ). Perhaps, the technology design and electronics mechanics have a lot to do with that. While film cameras use the composite or steel plate the camera shutter, many digital cameras use either electronic or magnetic-mechanic the camera shutter instead.
I'd say that if you've used your compact camera a lot for the past 3-4 years, you'll soon need a new replacement. That camera has already served you well. Nevertheless, many may disagree. To me, compact digital camera is like a PC. It depends on how you use it for your works. Good and better PC technology will always show up nearly every quarter, so will a digital camera. But, you don't need to keep up with it. Just spend wisely for what you really need to use for. Good luck.