M
matthias s.
Hi there,
I'm writing a class which should hold some state information of my web
app. The class should be placed in the Cache for performance reasons.
But when the class gets removed from the cache (because its time has
expired), I'd like to persist the current state of the object to the
database.
Is it safe to place the code persisting the state to the db in the
destructor of the class?
Thanks in advance...
I'm writing a class which should hold some state information of my web
app. The class should be placed in the Cache for performance reasons.
But when the class gets removed from the cache (because its time has
expired), I'd like to persist the current state of the object to the
database.
Is it safe to place the code persisting the state to the db in the
destructor of the class?
Thanks in advance...