Eh, I'm a bit foggy on the exact rules, also. I'm just going by situations like with Artemi Panarin in Chicago, where they were fine cap-wise last year but aren't this year because he achieved last year's bonuses.
Article discussing the Panarin bonuses.
Staple *may* end up being correct, but it just doesn't seem to jive with past "cap issues" where teams seemed fine the year in which the player earned the bonuses, but then had to unload salary after that season because of the cap implications they'd face the following year due to performance bonuses being met.
Link about the Canucks facing cap hit carry over for 2016-17 due to bonuses hit the previous season.
I've been trying to look around for clear cut, plain-as-day explanations, but a lot of the different rules seem to muddy things. As you can see from the article above about the Canucks, the following quote is what is making it a bit unclear.
The bolded seems to imply that any sort of cap implication for players hitting their bonuses carries over to the following season, not the current one. What's unclear is exactly how they affect the player's cap hit at the beginning of the season.
Going back to the Panarin example, the reason I'm unclear about whether the cap hit is considered to include the potential performance bonuses or just the base salary is, Chicago was fine prior to Panarin reaching his bonuses, but got into cap trouble at the end of the year when he reached all his bonuses. If Panarin's cap hit to begin the 2015/16 season was simply his base salary + all potential performance bonuses, then they should have been in trouble right away.
As it is, general fanager lists Panarin's cap hit as $812,500. That seems to be the hit to Chicago's cap, but the bonuses he earned are tacked on this year because he reached them last year. If what Staple said was correct, one would think that Panarin's cap hit is actually $3,387,500 (base + potential bonuses). Yet, that's not how it's listed for Chicago.
So, yeah ... fun stuff.