views:

35

answers:

1

Hi I have different urls that points to the same code

www.url1.com www.url2.com

I need to use the cache, but if the asp net cache is enabled when someone access to www.url1.com next person accessing www.url2.com could get the previously cached data (www.url1.com)

I need to have ALL caches activated except this one.

+2  A: 

You can disable ASP.Net output caching for the entire application by putting it in your web.config file.

<configuration>
    <system.web>
        <caching>
            <outputCache enableOutputCache="false">
            </outputCache>
        </caching>
    </system.web>
</configuration>

But unless you're actually putting anything in the cache in the first place, you don't have anything to worry about.

womp
thanks womp but that would completely disable the cache for my app. I think I have it: I added response.Cache.SetNoServerCaching();+1 anyway for giving me a hand. Thanks a lot!
Timmy O' Tool
Haha - I'm still confused, but no problem :)
womp
actually, I was confused. I thought that with your configuration I would lost the cache support on ALL the way from client to server. But it only affects (as the name says) the asp output cache. If I add other cache headers this doesn't override them. Sorry for the confusion
Timmy O' Tool