0

I am developing a web in .net that uses some Sharepoint data. There is no problem on it except for a specific list. This list can have a lot of records (> 5000) and is used in all webforms as a selectable combo (so I only need ID and value).

Is there any viable way to store this data in session (or another way) or is it the best practice to do the query every time you need the data?

The Sharepoint queries are quite slow (also, it can throw throttling error) so it makes me sad to be querying all the time for same information. I would not have this problem with a SQL table (its not an option).

I have been reading a lot (I liked: Is there a best practice and recommended alternative to Session variables in MVC) But I would like if someone can advice me what he would do on my case. I've been using Session storage but I read it's not really an option for that amount of data.

Thank you very much!

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mayra
  • 51
  • 3
  • If this list is the same for everyone, then sessions aren't the right way to go; you'd be duplicating that data in every single session. Rather, caching would appear to be your best bet. – Greg Schmidt Mar 07 '19 at 05:31

1 Answers1

0

You could implement caching module and store data in MemoryCache (System.Runtime.Caching) or in WebCache.

memoryCache.Add(key, value, absExpiration)