Are inlay and onlay restorations better than traditional dental fillings for cavities?

Are inlays and onlays a better long-term solution than conventional fillings for restoring decayed teeth?