Hi!
As you said, you can use any type of external database.
If you're looking for something more simple - try Cache::FastMMap.
The only way to do that without external modules (just perl core +
Mojolicious) I can think of is a file, but you need to use some locking
mechanism like flock.
If you can use external modules - it's better to do that. If you need
persistent storage - using external database like Redis is probably the
most appropriate solution.
On 16/05/2019 09:24, Veesh Goldman wrote:
What are my options if I need all of my workers to share some bit of
dynamic data? Let's say there's some counter that needs to be
incremented every time something happens, but is only relevant while
the app is running. Do I need to use a DB for that, or Redis or
memcached, or is there something built in to help with that.
I'm assuming that the memory isn't shared because the process forks to
make the workers.
Thanks
--
You received this message because you are subscribed to the Google
Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/mojolicious.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mojolicious/CAO-W_8CrrP-DXxPP_TXxP7wf-dQY1e7nezqSgFHe8BTo6_853Q%40mail.gmail.com
<https://groups.google.com/d/msgid/mojolicious/CAO-W_8CrrP-DXxPP_TXxP7wf-dQY1e7nezqSgFHe8BTo6_853Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mojolicious/ad4f971b-9cc8-1cd6-f101-e0c63fadc672%40gmail.com.
For more options, visit https://groups.google.com/d/optout.