Preheat oven to 180 C. Grease an 8½ x 4½ x 2½-inch loaf pan and flour it. Keep it aside.
In a bowl beat together butter and sugar for 5 minutes on medium speed until light and fluffy.
With the mixer on medium speed add eggs beating after each addition. Beat for one minute until the color turns pale yellow.
In another bowl, sift or whisk together flour, baking powder, soda, and salt.
Add shredded coconut and set aside. This is the dry ingredients mix.
In a food processor, chop the pistachios until coarsely chopped. Take out 2 tbsp for garnish and process the remaining pistachios until finely chopped. Add it to the dry ingredients and mix.
In another bowl, add ½ cup coconut milk, lemon zest, 2 tbsp lemon juice and vanilla. Mix well. This is the wet ingredients mix.
Add the wet and dry ingredients alternatively to the batter, and fold in gently. Do nt over-mix.
Transfer to prepared pan and bake for 45-50 minutes until toothpick inserted comes out clean.
Allow cake to cool in the pan for 10 minutes.
meanwhile make the sauce by mixing ¼ cup sugar, 2 tbsp coconut milk, and 1 tbsp lemon juice. Bring to a simmer and pour syrup all over the cake while it is still warm. Sprinkle with pistachios. Let the cake cool completely and serve.