다음을 통해 공유


Just a Bit of Caching

Does WCF ever cache the DNS lookup for a service address? How do I clear this cache?

There is just a tiny amount of caching that I know about. The TCP and MSMQ transports use a shared cache for recently used addresses. I think for MSMQ that this is only a factor for custom dead letter queue addresses. In any case, this cache is to speed up lookups in the case that you're hitting the same address over and over again very quickly. There's no way to clear the cache, but the lifetime of entries is two seconds so you'd have to be changing DNS settings extremely often to notice this.

If you're getting stale lookups, then it's probably an operating system or server cache that is causing that.

Next time: Moving Services and User Principals

Comments

  • Anonymous
    April 13, 2007
    How do I run some code during service start time if I'm using an IIS hosted service? In a normal executable