After a course in the Pontifical Roman Seminary, he received a doctorate in philosophy, theology, and in civil and canon law. Pope Leo XIII named him professor of public ecclesiastical law in the Roman Seminary in 1880, a position which he retained for fifteen years, during which time he proved himself an eminent canonist, especially in all that related to the constitution of the Church and its relations with civil society.
The Roman congregations vied with one another in securing his services. He was appointed Consultor of the Sacred Congregations of Bishops and Regulars, of the Council, and of Studies; Consultor and Secretary of the Congregation of Extraordinary Ecclesiastical Affairs; Canonist of the Sacred Penitentiary; and member of the Commission for the Codification of Canon Law. In all these offices he left traces of his acuteness and skill in handling arduous and delicate questions. Austria, Spain, and Portugal honoured him with titles and distinctions, while the sovereign pontiff made him successively canon of several Roman basilicas, rector of the Roman Seminary, Domestic Prelate, and finally, on 18 April 1901, raised him to the cardinalate as Cardinal-Deacon of Santa Maria ad Martyres. Cavagnis died in Rome at the age of 65.
Works
He is best known for his important work: "Institutiones Juris Publici Ecclesiastici" (Elements of Public Ecclesiastical Law), a reliable and even classical manual of ecclesiastical government.
The most important of his publications are: "Della natura di società giuridica e pubblica competente alla Chiesa" (Rome, 1880); "Nozioni di diritto pubblico naturale ed ecclesiastico" (Rome, 1886); "La Massoneria quel che e quel che ha fatto, quel che vuole" (Rome, 1905); "Institutiones Iuris Publici Ecclesiastici" (Rome, 1906), in three volumes.