0

I am new in memchached concept. I search everywhere but i couldn't find anything how to implement in ASP.net 4.0. Can anyone tell me about the right concept.

I successfully installed memchached Server in services.msc Now what to do after this step.

can any one have good example in Asp.net. If yes, Please provide me. OR Please tell me step by step code.

I also read these article http://rsuharta.wordpress.com/2011/04/27/memcached-provider-in-the-net-web-application/

But didn't understand anything. Please provide me best solution

Thanks.

ankit Gupta
  • 313
  • 1
  • 5
  • 19
  • If you are using .net technologies on windows servers, maybe you should consider opting for a windows technology. I would take a look at AppFabric. – Elad Lachmi Dec 28 '12 at 11:46
  • Use NuGet to install the Enyim.Memcached package. It's a nice C# library for accessing Redis and Memcached services. – Morten Mertner Dec 28 '12 at 14:39

1 Answers1

0

Here is a CodeProject article walking you through using memcached in an ASP.NET application.

However, let me first say that it's awful likely that if you don't already understand the concept of a framework like memcached you don't need it.

Let me try and make this as clear as possible so you can make the right decision. For some reason, as of late, data caching has become the new "golden hammer" and all kinds of frameworks have popped up. But the problem is that most developers don't understand the real driving forces behind implementing data caching and they don't understand that it's really not a trivial matter. I'm going to give you the same example I gave someone else just yesterday on SO, but a paraphrased version.

Imagine if you will an application stack (i.e. more than one application) that accesses a shared set of data at a rate of more than, and I'm going to give you the real number, 40M+ transactions per day. Now, when I use the term transaction here I really mean read or write. Which only complicates things BTW because now I have to optimize for both.

Alright, so now we have a set of applications accessing this shared data at a ridiculous rate per day - how do we ensure reasonable response times for both read and write? Data caching. But, if you're not sitting in that boat you probably don't need data caching and need to spend your time learning other things that are more relevant to what you're doing.

Mike Perrenoud
  • 66,820
  • 29
  • 157
  • 232
  • Thanks Michael, I already saw this article but couldn't successfully run this code. I hv a windows server and i hv to implement in web application – ankit Gupta Dec 28 '12 at 11:40
  • caching is very important part of any application. Now i hv being working on such a project where lot of transaction are done. I mean i am creating a social networking site such as facebook so now caching is very critical part in this project. so that's y i need memcached. – ankit Gupta Dec 28 '12 at 11:50
  • @ankitGupta, two things. If you're running a Windows stack why aren't you leveraging Windows Server AppFabric Caching then? And secondly, if it's that important, edit the question with the code you have and tell us what's not working about it. The example on CodeProject is very straight forward. Is it the server that's not working? The code? Where is the problem my friend? – Mike Perrenoud Dec 28 '12 at 11:52
  • Please tell me which is better one memcached or AppFabric in this type of project and secondly i don't now how too implement in asp.net . – ankit Gupta Dec 28 '12 at 12:00
  • Well if it's a Windows stack AppFabric Caching is more built-in and has a very simple API. However, you're going to have to get on Google and search for examples, `windows server appfabric caching c#`, and do something. When you come to a roadblock with a specific piece of code you can ask another question. – Mike Perrenoud Dec 28 '12 at 12:14
  • Hey Michael thanks for ur suggestion. Can i hv ur email id so that we can chat on this topic. – ankit Gupta Dec 28 '12 at 13:17