He just turned 24 years old. The injuries also mean less carries over 4 seasons.
I understand the injury history is a concern. An example? Look no further than James Connor last year. He's been injured every year and last year put together a good season.
The cap number is the worry. Conner played on a very low cap number, Barkley wouldn't. But it's only a 1 year risk.
I look at the 1 year more than the cap number. The 1 year deal is what makes him a match for the Bills.