Home > Net >  What is the difference between static variables and redis?
What is the difference between static variables and redis?

Time:10-14

Don't consider redis persistence, not all memory storage? How much difference on the performance? The same principle?

CodePudding user response:

The difference in principle and performance are

Static variables are just simple memory access
Access to Redis pass TCP communication, protocol processing

CodePudding user response:

Their program in a few small amounts of data, you want to use static to deposit without any problems.
If the data more, tens of thousands of article.
In if you A saved in A program, program B want to obtain A remaining data, how make static variables.

CodePudding user response:

Redis store the files,

CodePudding user response:

This question is very simple, you can also achieve the function of c # any c + +, why in c #?
Simple, quick, efficient, professional, etc.
As for the principle of not in memory that simple, all things on the computer is 1 s and 0 s, "operating memory" is actually has a lot of exquisite,

CodePudding user response:

Redis persistence, can save more, static variables, a, restart the server, redis remain static variables to restore the default value

CodePudding user response:

refer to the second floor hanghangz response:
their program in a few small amounts of data, you want to use static to deposit without any problems.
If the data more, tens of thousands of article.
In if you A saved in A program, program B want to obtain A remaining data, static variables how make.
Php program to save the data, the c # program can take is to do so? Used to get or say directly
  •  Tags:  
  • C#
  • Related