Forum: Ruby on Rails using ActiveRecord's query_cache for fun and profit

Posted by Pitr Vernigorov (Guest)
on 2013-01-15 22:42
(Received via mailing list)
I need to store some data on a request basis and I was wondering how BAD
would it be to just stick it into ActiveRecord's query_cache. The way I 
see
it, all the hard stuff is already done, like thread-safety. Suggestions?

ActiveRecord::Base.connection.query_cache['some']['var'] = 42
# later
ActiveRecord::Base.connection.query_cache['some']['var']

Thank you.
Posted by Dheeraj Kumar (Guest)
on 2013-01-16 04:56
(Received via mailing list)
Why not stick it into the session?

--
Dheeraj Kumar
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.