httpruntime.cache on local machine and appfabric cache on servers

260 Views Asked by At

Can any one help me develop an cache architecture where I can use httpruntime.cache when using localmachine (for development purposes) and use appfabric cache when application running on server?

I currently have the appfabric code already implemented. I know need to the logic to identify the localmachine usage and switch caching mechanism to httpruntime.cache...

Thanks to all gurus in advance...

1

There are 1 best solutions below

0
On

At first, you need the same common client interface for all tour cache providers : Get, Put, Remove, ... It' not difficult and you can take a look at Service Stack Caching.

An Ioc frameork like StructureMap or Unity will help you to use the appropriate provider based on a static or dynamic test.