Add cached name and size fields to attachment model.
Change the way to generate attachment resource path.