I have a Rails application, that includes chat. Everything works fine, but now I want to store the last 50 chat messages somewhere. I need it to show the last messages if a page is reloaded. I don't want to use database. It would be good to store it in some kind of array, but Rails is stateless. I'm looking to make it a little more stateful with your help.

Thx

**UPD**:

I've found `PStore` ( <http://www.ruby-doc.org/stdlib/libdoc/pstore/rdoc/classes/PStore.html> ). It looks pretty good for me, doesn't it?