MemoryStore vs Class Variables


Apart from the possibility of changing the Store of the Rails’ cache
without much code modification, what’s the benefit of using a
MemoryStore backed cache over class variables to cache models?

Excuse the contrived question, I’m just trying to work out the best way
to cache some data.