This article is a mirror article of machine translation, please click here to jump to the original article.

View: 339989|Reply: 131

[WinForm] .net/c# operation redis cache addition, deletion, modification and query [source code]

  [Copy link]
Posted on 9/13/2017 11:03:27 AM | | | |


Because, according to the needs of the project, caching services are required, and some data does not need to be written to the database, but the data needs to be calculated and processed

At the beginning, it is written to memory, but this disadvantage is that after IIS is restarted, all the data in memory is lost

So, we store data in REDIS, and even if IIS goes down, we don't have to worry about data loss

I refer to many redis methods encapsulated by others on the Internet, and some of them are not suitable for me, so I encapsulated a redishelper method by myself



I also wrote a demo, which is to add data to redis in batches and take out all the data of redis

Demo source code download:

Tourists, if you want to see the hidden content of this post, pleaseReply





Previous:Easy language software icon
Next:spring.net nhibernate sqldatetime overflow solution
 Landlord| Posted on 8/16/2018 9:37:07 PM |
install-package ServiceStack.Redis -Version 3.9.71
install-package ServiceStack.Text -Version 3.9.71
That's it

interface if not manually replaced.
In addition, you can also go directly to GitHub to download all the dlls of 3.9.71 and refer to them manually.

Note that version 4.0 of ServiceStack is a commercial license, and 3.9.71 is open source and free.
I think StackExchange.Redis is also good, recommended
Posted on 8/30/2019 12:26:33 PM |
Reference, learn.                           
Posted on 7/12/2019 9:50:33 AM |
Reference, learn.                           
Posted on 9/14/2017 12:02:16 PM |
Thanks for sharing
Posted on 9/14/2017 2:55:52 PM |
Thanks for sharing
Posted on 9/15/2017 10:26:15 AM |
Learning, learning...
Posted on 9/22/2017 5:50:10 PM |
Thanks for sharing
Posted on 10/23/2017 12:30:49 PM |
Learned··········
Posted on 11/9/2017 9:51:41 AM |
Thanks for sharing
Posted on 11/15/2017 2:25:47 PM |
ghghjgjhjg

Score

Number of participants1MB-1 contribute-1 Collapse reason
QWERTYU -1 -1 Do not pour water, improving the quality of reply posts is the duty of every member.

See all ratings

Posted on 11/29/2017 5:02:55 PM |
Thanks for sharing
Posted on 12/3/2017 5:00:54 PM |
In the process of learning redis, look for information
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com