Nil Pun
Nil Pun

Reputation: 17373

does azure redis cache/session requires Serializable attribute

I'm planning to use the Azure redis for session state and caching purpose.

In the past I've used enterprise library and azure dedicated cache which requires [Serializable] attribute for all the objects (complex objects) that needs to be stored.

Can someone please help me understand what are the requirement for object to be stored as session or cache using azure redis?

Also is there any pattern ask Cache to give back given object. e.g. if I ask for employee object the cache should give me that.

Upvotes: 2

Views: 779

Answers (1)

astaykov
astaykov

Reputation: 30903

I wonder how you imagine transferring an Object over the wire without serializing it?

Take a deep and thorough read on the documentation here. And more specifically, the Working with .NET Objects part.

The latter already gives also the answer to your second question.

Upvotes: 5

Related Questions