title: Permanent variable in Rails
body: <p>Lets say that on top of my Rails app there is a bar with piece of text displayed - latest hot deal, scheduled downtime notfication, something like that. It's a single, on of a kind information that needs to be accessed on basically every request, and may be updated from time to time. What is the best way to achieve this?</p>
  
  <p>What I'd like to do is some kind of permanent global variable (accessible from controllers).</p>
  
  <ul>
  <li>It will be updated very rarely, so there's no problem if for some time after update there will be an inconsistency between workers.</li>
  <li>On the other hand, it should be persistent in case of server fault (periodic backup is enough).</li>
  <li>It will be accessed really often, so it should be as fast as possible - preferably stay in memory.</li>
  <li>Also, it's only one of a kind, so I'd really prefer not to bloat the app with a dedicated database model.</li>
  </ul>
  
  <p>Something like that is damn easy in Node.js for example, but I couldn't find a single way to achieve this in Rails. What shall I do?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Thanks for the answers so far, but while they're inspiring, I think that I should stress out one key functionality that they're all missing. <strong>The variable should be editable inside the app and persistent.</strong> While it's possible to edit your variables, in case of server restart I'm back to the default - which is bad.</p>