The shrine of Ridi Vihare has its beginnings in a series of cave dwellings on the rocky hillside. In the early days of Buddhism these were once inhabited by meditating monks. Numerous Brahmi inscriptions record the donation of caves for the use of the Sangha and at one time there were thought to be nearly 500 priests residing in the caves on the hillside.
According to the Mahavamsa, the story of Ridi Vihare begins during the reign of King Dutu Gemunu. The greatest king of Anuradhapura, Dutu Gemunu was the first ruler to bring the whole island under his sway.