Why Rails.cache is not thread safe?

Posted by Freewind on Stack Overflow See other posts from Stack Overflow or by Freewind
Published on 2010-06-18T06:32:54Z Indexed on 2010/06/18 7:03 UTC
Read the original article Hit count: 436

Filed under:
|

I know Rails.cache is ActiveSupport::Cache::MemoryStore, and it is not thread safe.

I don't understand, why rails use a thread-unsafe cache as its default? Why not use ActiveSupport::Cache::SynchronizedMemoryStore? In my opinion, in a web site, if a cache is not thread-safe, it almost useless, because the requests are not handled in ONE thread.

Do you use Rails.cache in you webapp? And how do you use it?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about cache