Both terms are a little old-fashioned today.
"Cheesecake" allegedly began when a New York newspaper lensmen photographed Russian opera singer Elvira Amazar in 1915. However, this is a generation before our first recorded citation for "cheescake."
(From a recent exhibit at the Museum of Sex, Fifth Avenue and East 27th Street)
THE ORIGIN OF CHEESECAKE
At the height of French postcards popularity, the phrase (sic) "cheesecake" was coined. In 1915 George Miller shot the Russian opera singer, Elvira Amazar, for a New York newspaper when she landed in the city. He had her hike up her skirt for the shot, and according to legend when his editor saw the photo, he exclaimed, "Why this is better than cheesecake!" (also a new delicacy at the time).
(Oxford English Dictionary)
cheesecake (slang, orig. U.S.). Display of the female form, esp. in photographs, advertisements, etc., in the interest of sex-appeal; female sexual attractiveness. Also attrib. (Cf. beefcake.)
1934 Time 17 Sept. 30/2 Tabloid and Hearstmen go after 'cheesecake'leg-pictures of sporty females. 1942 Time 24 Aug. 4/1 The supreme Empress of Cheesecake, the very Marlene Dietrich,..was fittingly crowned by the Treasury as the champion bond seller. 1948 Illustrated 6 Mar. 4/1 American magazines sell millions of copies because of their 'cheesecake' pictures'cheesecake' being their name for pictures of movie stars or showgirls with beautiful legs and scanty clothing.
beefcake (slang, orig. U.S.) [humorous, after CHEESECAKE], (a display of) sturdy masculine physique;
1949 in Amer. Speech (1954) XXIX. 282 Alan Ladd has a beefabout '*beefcake', the new Hollywood trend toward exposing the male chest.
10 October 1949, Chronicle-Telegram (Elyria, Ohio) pg.8, col. 3:
Speaking of male torsos, be advised that we're in the middle of a new Hollywood fad. The producers are convinced that scenes exploiting well-muscled chests are "box-office," and they're using them in both movies and stills. The Hollywood cameramen have already invented a new word to suit the occasion. Whereas photos showing the feminine figure are labeled "cheesecake," those glorifying the male carcass will henceforth be known as "beefcake."
("Jimmie Fidler in Hollywood" - ed.)
6 December 1949, Zanesville (Ohio) Signal, pg.16, cols. 7-8:
Sudden thought: Shouldn't those stripped-to-the-waist publicity
photographs of Alan Ladd and Vic Mature be referred to as beefcake--male version of cheesecake?
("In Hollywood" by Erskine Johnson - ed.)
February 1957, Photoplay, pg. ?:
THAT'S HOLLYWOOD FOR YOU
By Sidney Skolsky
Cheesecake: The first performer to whom the label "cheesecake" was applied was Elvira Amazar, a Russian opera singer, when she arrived in this country back in 1915.
Beefcake: First actor to get the coined beefcake label was Tony Curtis.