Which approach is suitable for caching unique auto content lists for users?

I am creating an application (asp.net/c#) that will automatically launch a couple of fields into which users will be entered. Each user will create their own auto content list. Each time they add an item, if it is a new word, it will be added to their list of auto messages, as in gmail.

I was wondering how most people do this? Does making a server call for every keystroke not seem very efficient? Should I make a huge XML file with one entry for each user? Xml file for each user? How will I cache this to make it effective?

All kinds of questions, but what I'm mostly looking for is best practices. Thanks.

+3
source share
3 answers

I would store the values ​​in a database (where you might save your user profiles), and pull the values ​​into an ASP.NET session when the user logs in. Then simply use the values ​​from the session to automatically complete the value. That way, you only need to hit the database once when they log in.

+1
source

Data Warehouse
You must store this information in a database. Create a table or two to store this type of information for each user in the field.


( AJAX), . , , , 3 (ish) , . .

, .


, , .

, , 3 , . , , . , . , , , , , .


. ( javascript -, onchange . , - AJAX.

, , .

+2

JavaScript, , , , . XML , .

, , SQL- . , , cookie, , , .

Chuck does not recommend using session variables because you are degrading the performance of your application, because it must support these automatic selection values ​​in memory for each user.

Chuck would like to know if you need anything else before he surrenders my brain.

+1
source

Source: https://habr.com/ru/post/1702703/


All Articles