I have had both of the Ryobi 18v drills - the nicad and li-ion. The lithium batteries died quickly. The old nicad has lasted 5x as long through lots of remodeling. It is a good bargain at 89 at Borg.
Your experience is quite the opposite of mine, I could never get the Ryobi NiCd batteries to last much more than a year -- beyond that they will lose all their charge within a matter of hours of being removed from the charger.
On the other hand, the Ryobi Lithium batteries have lasted nearly 3.5-4yrs (I bought my first sets when they first came out) before I had to replace my first and oldest lithium battery. Even so, the battery I replaced still held about 1/3-1/2 its original charge after all those years. I have a total of 6 lithium batteries at present so it isn't exactly a fluke.
My suspicion is that our usage patterns may well be where the explanation lies. If you regularly run your batteries until they are flat dead (or nearly so) then you are really better off with NiCd/NiMH batteries which pretty much thrive on that sort of abuse -- so much so that that sort of abuse literally helps to preserve them. Lithium batteries, though, do not like to be deeply discharged and will exhibit a far shorter lifespan if regularly and repeatedly discharged to their cutoff point. In fact, the Ryobi lithium battery that I had to replace recently is the very battery that is regularly (say once a week or so) run until its internal cutoff in a handheld shopvac, which I routinely use to clean up the shop after a days work.
My general usage pattern consists primarily of lots of relatively shallow discharges - seldom much more than 50% -- with many shallow recharges at the end of each day. Not only do lithium batteries thrive when presented with this sort of usage pattern, but they do not suffer the annoying memory affects that rapidly cripple NiCd & NiMH batteries when subjected to the same pattern (yeah, I know they claim NiMH don't suffer from the 'memory effect' -- total BS). That said, if I were the sort of user who regularly ran my batteries until dead before recharging, the NiCd's (or NiMH's) would truly shine and the Lithiums would tend to come up short by comparison.
Something to consider when choosing a battery technology.