Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to create a WCF service that's going to do some pretty heavy database querying that I therefore want to cache. (System.Runtime.Caching)
For performance reasons it should also be multithreaded.

If I would set Instance Context Mode to PerCall I can't use MemoryCaching since the cache is recreated with every instance.
If I would set Instance Context Mode to Single and Concurrency Mode to Multiple, Caching would work just fine but I would need to make everything threadsafe.

Have I understood everything right?
Any better recommendations?
Posted

1 solution

If you are dealing with heavy data then using system cache will not be a good solution. Instead you can try memcache or membase for caching data. Now most of the websites has started following this caching technique.

http://en.wikipedia.org/wiki/Memcached[^]

http://memcached.org[^]

Implementing Distributed Caching using Memcached[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900