S
Summercool
It seems that Ruby on Rails session is done by using Data Marshalling
(or also known as Data Serialization or Data Deflating)....
So let's say if my session has a class Foo with an array of Bar
objects...
so when the user access each new page (GET or POST to the Rails
server), then the session data is regenerated from the textfile or
database table session...
Now in that case, any class variable in the Bar class can be wrong...
because let's say the Bar class has the class variable of total or
count, but Rails is not re-generating them.... Rails is only re-
generating the Bar objects. No Initialize() was ever called... in a
way, it is like the objects are cloned... without ever "initialized".
(or also known as Data Serialization or Data Deflating)....
So let's say if my session has a class Foo with an array of Bar
objects...
so when the user access each new page (GET or POST to the Rails
server), then the session data is regenerated from the textfile or
database table session...
Now in that case, any class variable in the Bar class can be wrong...
because let's say the Bar class has the class variable of total or
count, but Rails is not re-generating them.... Rails is only re-
generating the Bar objects. No Initialize() was ever called... in a
way, it is like the objects are cloned... without ever "initialized".