In a RoR application, I wo开发者_如何转开发uld like to load a set of key/values from db into a global variable which persists across requests and clear the variable as and when I need. My application runs in a WAS cluster. I tried a few things. 1. Used memcachestore and read/write/clear as needed. 2. Load the key/values in a yaml file and clear it when required. Please let me know if I could do it differently.Thanks.
Don't we have flash and session hashes which can store any object we need?
精彩评论