There are several schools of thought.
Some say clean after every session.
Others say most wear and damage comes from too frequent cleaning.
With modern non-corrosive ammo the same necessities that were there pre-WWII don't exist today. Yes, clean out the dirt and soot but the corrosive residues are no longer an issue.
I don't own any firearms that are merely "stored". Every one I own gets shot fairly regularly. After each session I do a brush down, pull a bore snake through the barrel, and place a very small amount of lube in the appropriate wear points.
That's for handguns. My rifles get different treatment. The AR's get a bore snake down the barrel and a quick inspection/cleaning if necessary of the bolt.
My "bolt action" doesn't get cleaned until its seen 100 or so rounds. This is my "accuracy piece" and after a good scrubbing of the bore it needs a dozen or so fouling rounds to get it back to "same hole" accuracy. A recent article on accurateshooter.com had some comments from one of the premier shooters who used to carefully clean his competition rifle after 20-30 rounds. He kept logs on his cleaning process. Then he started extending the cleaning intervals and found that accuracy wasn't effected, one way or the other, when he went over 100 rounds before cleaning.
I have put several thousand rounds through my .308 barrel and it still is just as accurate as when I took delivery of the rifle (providing I do my part and don't jerk the trigger).
Twice a year I clean everything right down to the finish. A wash down of brake-kleen, pick all the carbon particles out of corners and crevices, inspect all wear points, then re-lube and reassemble as necessary.
Pistols and AR's get post session "Bore Snake" cleaning and the bolt actions are cleaned every 100 rounds or so. With my shooting schedule no firearm in my possession fails to be shot at least once a month. I don't want any of them to "get lonely".