Does anyone know the criteria that determines the salary cap? I know it is based on season and playoff revenue but what are the specifics?

Also, wasn’t the cap rumoured to be $82M? Teams should be pretty well prepared as $81.5M isn’t far off.