R
R
Roman Koff2016-03-29 16:10:19
ASP.NET
Roman Koff, 2016-03-29 16:10:19

How to cache user data in ASP.NET MVC?

The session of the user interests. That is, the cache must be available to a specific user session. It is also important that the cache has a lifetime after which the data would be updated.
How to make a similar cache at the application level (for all user sessions), I know it is necessary for the session:

HttpRuntime.Cache.Insert(key, obj, null, DateTime.Now.AddMinutes(minutes), TimeSpan.Zero);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2016-03-30
@Zarinov

Add the session Guid to the key, which will be stored in cookies.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question