in reply to Re: Dancer & Plackup - Redirect not refreshing page data
in thread Dancer & Plackup - Redirect not refreshing page data

I thought about that but it looked like just route path caching to avoid searching the whole registry, not actual data.
Anyways, tried it, no luck
  • Comment on Re^2: Dancer & Plackup - Redirect not refreshing page data

Replies are listed 'Best First'.
Re^3: Dancer & Plackup - Redirect not refreshing page data
by jeromek (Novice) on Aug 07, 2014 at 14:11 UTC

    I think I've tracked it down to starman.
    With only 1 worker, all works fine. I guess the second worker picks up the other request but not in the same DB transaction and doesn't see the update.

    The question is now is it an internal starman cachine problem or am I doing something wrong with my database connection ?
    My guess is that it's not only database because the session info is not pickup by the 2nd worker either so starman is doing something wrong, workers are not synchronized.

    Is there any Starman-specific community I could ask ?

      How do you connect to the database? Do you open a new connection for each request?
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
        I use Dancer::Plugin::Database and the update process is:
        database->quick_update(...); database->commit();

        The reason I say it's not only DB is because on another environment, it fails to resolve the session user after submit.
        session('user') which is set by the first thread throws an uninitialized warning value after submitting (supposedly pickup by the 2nd worker).