Adding basic support for attachment fields

Signed-off-by: Elliot Condon <e@elliotcondon.com>
Fixed incorrect cache key

Signed-off-by: Elliot Condon <e@elliotcondon.com>