What is the best state management to store user search criteria on different pages in ASP.NET MVC?
- Session: stored on the server and may consume its RAM
- Cookies: small size
- local storage: it is javascript aside, but my codes are ready to cache data on controllers not the javascript side
- cache: stored on the server and shared between different users, so if a user entered search criteria then other users will show its search results
notes:
- the system may have thousand(s) of simultaneous users
- I have 10 pages that I need to keep their search data
- each page may contain up to 5 different search criteria (name, email, etc)
- I don't need search data after the user logout
you can use one of the below modes.
InProc - Sessions are stored inside of application's process on a web server. Depending on the IIS version used that could be aspnet_wp.exe or w3wp.exe.
StateServer - Sessions are stored using State Server windows service.
SQLServer - SQL Server database is used to store sessions' data