Store object in iCacheStore session cache

Hi



We have a need to cache some data at the user session level on the server and have identified iCacheStore as the repository choice for this. The following link (https://academy.creatio.com/documents/technic-sdk/7-15/repositories) only gives examples to store strings as values inside the cache object dictionary. 



Could we get a code snippet for how to store C# objects as values inside the cache object dictionary? Thanks in Advance!!

Like 0

Like

1 comments

Dear Shrikanth,

 

In order to store an object in Application cache you should serialize the object to string and save the string. Please find more information about serialization in the article by the link below:

 

https://stackoverflow.com/questions/2434534/serialize-an-object-to-string

 

Best regards,

Norton

Show all comments