Potential concurrency issues with a global hash to reduce DB

If you're not running on rails threadsafe! mode you'll have no
concurrency issues. A messaging queue could also be a solution to your
problem.