views:

420

answers:

1

Hi there,

I have several WCF services and ASP.NET application both accessing data via shared service layer. Inside this layer I'm performing all required data access and caching. Now I need to share cached object between WCF ans ASP.NET. What's the best way to configure Velocity to work on a SINGLE server. Also how can I disable object serialization?

Thanks!

A: 

MS Velocity is designed to provide a distributed cache. If you only have a single server MS Velocity may be a bit overkill.

Another point against using MS Velocity is that it is still in CTP.

In your case I would use MS Enterprise Library Caching Application Block. If you set up your ASP:net and your WCF site to use the same application pool they will have access to the same memory.

http://msdn.microsoft.com/en-us/library/dd203099.aspx

Shiraz Bhaiji
Is it correct, that application running in the same AppPool has shared ASP.NET Cache object?
Sergejus
The Enterprise Library Cache not the ASP.Net Cache. The Entlib cache is a singleton, both applications access the same memory, therefore, they should both have access to the same singleton.
Shiraz Bhaiji