Make the filling first. Add the crushed pineapple with its juice, sugar, and lemon juice to a medium saucepan. Bring to a gentle simmer over medium heat, stirring often. Cook for 25 to 35 minutes, until most of the liquid has evaporated and the pineapple looks like a thick, spreadable jam.
Whisk the cornstarch with 1 tablespoon (15 milliliters) water in a small bowl. Stir it into the pineapple mixture and cook for 1 to 2 minutes, until very thick. Scrape the filling into a shallow bowl and cool completely. For easier shaping, refrigerate the filling for 20 minutes after it has cooled.
Heat the oven to 325°F (165°C). Lightly grease a 12-cavity mini loaf pan or 12 rectangular financier molds. If using a dark metal pan, line the cavities with narrow strips of parchment paper to make the cakes easier to lift out.
For the dough, beat the softened butter and powdered sugar in a medium bowl until smooth and creamy. Mix in the egg yolk and vanilla. Add the flour, cornstarch, and salt. Mix just until a soft dough forms; do not overmix. If the dough will not hold together when pressed, mix in the optional milk.
Divide the cooled filling into 12 portions, about 1 tablespoon (15 grams) each. Divide the dough into 12 portions, about 2 tablespoons (30 grams) each. Keep the portions covered with a clean kitchen towel while you work so the dough does not dry out.
Flatten one dough portion into a 3-inch (7.5-centimeter) round in your palm. Place one portion of filling in the center. Bring the dough up and around the filling, pinch the seam closed, and gently roll it into a short log. Place it seam-side down in a prepared mold. Repeat with the remaining dough and filling.
Bake for 18 to 22 minutes, until the edges are lightly golden and the tops look dry. The cakes should remain fairly pale. Let them cool in the pan for 10 minutes, then carefully lift them out and cool completely on a wire rack.
For the best tender texture, store the cooled cakes in an airtight container overnight before serving. They are also enjoyable once fully cooled on baking day.