FOR THE CARAMELIZED PINEAPPLE:
1 cup/200 grams granulated sugar
1 1/2 cups/225 grams fresh pineapple, peeled, cored and cut into 1-inch cubes (from about 1/2 small pineapple)
FOR THE CRUST:
6 tablespoons/85 grams unsalted butter (3/4 stick), melted, plus more for greasing the pan
7 ounces/200 grams gingersnaps, from about 28 (2-inch) cookies
1 tablespoon granulated sugar
1/2 teaspoon fine sea salt
FOR THE FILLING:
1 (13-ounce/400-milliliter) can full-fat coconut milk
1 1/2 teaspoons powdered gelatin
16 ounces/450 grams cream cheese, cut into 1-inch pieces
1/2 cup/100 grams granulated sugar
1/2 teaspoon fine sea salt
1 tablespoon lime zest plus 2 tablespoons juice (from 2 limes)
Toasted coconut flakes (optional), for topping
Make the caramelized pineapple: Heat a medium saucepan over medium until a drop of water sizzles on the surface. Reduce heat to medium-low and make a dry caramel by adding the sugar in an even layer. The sugar should begin melting into a clear syrup once it hits the pan. If it browns immediately, your pan is too hot and the heat should be turned down. Allow the sugar to melt, stirring with a heat-safe spatula to cover any dry spots, about 3 minutes. As the crystals melt, the syrup will change color from light to golden brown, about 5 minutes. Once melted, continue to stir and cook the syrup until it is a deep amber color, 2 to 4 minutes.
Reduce heat to medium-low, and very carefully, to avoid splatter, add the pineapple all at once. Immediately cover with a lid to prevent the hot liquid from bubbling over. Once the bubbling slows after 1 to 2 minutes, stir the mixture to melt any hard chunks of caramel that have formed, 2 to 3 minutes. Remove from heat and allow the pineapple pieces to steep in the caramel syrup until they are infused, at least 30 minutes (or up to overnight in the refrigerator). The pineapple will turn a deeper yellow as it steeps, and will develop a more pronounced caramel taste.
(Caramelized pineapple can be made up to 1 week ahead, refrigerated and stored in the syrup.)
Using a fork, remove the pineapple pieces from the syrup, transfer them to a food processor to purée, or finely chop. Reserve and refrigerate the leftover caramel syrup for another use.
Make the crust: Lightly grease and line an 8-inch square pan with parchment paper, leaving about a 2-inch overhang on two sides. In a food processor, pulse the gingersnaps until they form coarse crumbs. (Alternatively, place gingersnaps in a resealable bag and crush with a wine bottle or rolling pin.) You should have about 1 1/2 cups crumbs.
Transfer crumbs to a medium bowl; stir in the melted butter, sugar and salt. The crumbs should look slightly wet and clump up when pressed together in your palm. Pour the mixture into prepared pan and spread to completely cover the bottom. Use the flat side of a measuring cup to compress, push and flatten the crumbs to cover the base and about 3/4-inch up the sides. Refrigerate while you make the filling. (Crust can be wrapped in plastic and refrigerated up to 1 day ahead.)
Make the filling: In a small saucepan off the heat, combine 1/2 cup/120 milliliters coconut milk with the gelatin and allow to bloom, about 5 minutes. In the bowl of a stand mixer fitted with a paddle attachment, combine the cream cheese, sugar, salt, lime zest and juice on the lowest setting until smooth. Heat the coconut milk-gelatin mixture on low to melt, about 2 minutes. Remove from heat and stir in the rest of the coconut milk to cool down the mixture. Scrape down the bowl and switch to the whisk attachment. Slowly pour in the coconut milk mixture with the mixer on the lowest setting. Stop to scrape down the sides as needed. As the coconut milk incorporates, the mixer speed can gradually be increased to medium to make sure the mixture is smooth throughout.
Pour the mixture into the prepared crust and dot the top with teaspoonfuls of the pineapple purée. Some spoonfuls will sink in to create lovely pockets of pineapple within the cream filling, which is fine! Chill at least 8 hours and up to overnight.
To unmold, run a knife or an offset spatula along the sides of the pan to loosen the crust. Lift both sides of the parchment and move cake to a board. Slice into 9 to 12 squares with a clean, warm knife, top each square with toasted coconut if using.