A King William County man will spend five years behind bars for possession of thousands of child sexual abuse material (CSAM) files.