Preventing Cache Manager from caching

Topics: Writing modules
Dec 13, 2011 at 6:08 AM

Is there a way to prevent ICacheManager.Get from caching something, in exceptional cases?

Let's say I'm using it to cache the result of something I get over the internet, but acquiring it fails.  The method returns a null value, but I want to return a null value but don't want to cache the null and instead try again if the cache is queried again.

I've looked at the cache source code but couldn't really find anything.  Must I throw an exception to do this?