NCache 4.6 - Online Documentation

Class Versioning (Same Platform)

 
If you have multiple applications connected to the cache environment and you want to upgrade the client applications, you will not be able to upgrade them simultaneously. Meanwhile, if some classes get upgraded in some applications, they will not be able to share data with the older ones. To cater this issue, NCache introduces Class Versioning.
 
If your class is Serializable and you write objects of the class to a data source and then later read them back in, you need the same version of the class to read with which you wrote into the class. If you want to use one version of a class to save something that acts like an object data base, and then change the class (new version), you will not be able to read the new version.
With NCache’s feature of Class Versioning Compatibility for same platforms, you can use the class versioning feature by configuring them through administrative cache tools and providing mapping for attributes with target class.
 
Class Attributes Mapping
ProductV2 Class (C#)
ProductV1 Class (C#)
id
id
name
name
price
price
quantity
quantity
discount
 
 
After mapping ProductV2 with ProductV1 you will be able to store ProductV2 and get it in ProductV1 and vice versa.
 
 
See Also