<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div dir="ltr" id="yui_3_16_0_1_1443007601573_2389">I've replaced all my<br class="" id="yui_3_16_0_1_1443007601573_2409">$dbh = DBI->connect, $sth    = $dbh->prepare calls with<br class="" id="yui_3_16_0_1_1443007601573_2411">the Dancer2::Plugin::Database equivalents<br class="" id="yui_3_16_0_1_1443007601573_2413">Before that, when there was interaction with the UI, I would explicitly connect, run all my sql and then disconnect, on every Ajax call .<br class="" id="yui_3_16_0_1_1443007601573_2415"><br class="" id="yui_3_16_0_1_1443007601573_2417">After I switched to Dancer2::Plugin::Database,I have to do the same interaction, for example, clicking a button which invokes an Ajax call which in turn calls the database retrieving the new data and updates the UI, does not have an immediate effect ,the UI is not being updated. So I have to do the same move (click a second time) for getting the desirable outcome<br class="" id="yui_3_16_0_1_1443007601573_2419"><br class="" id="yui_3_16_0_1_1443007601573_2421">Has that something to do with caching and reusing the connection?<br></div></div></body></html>