public void Set(string cacheKey, object cachedResult, TimeSpan cacheDuration) { cachedObjects[cacheKey] = cachedResult; // ignore complications here and cache duration // for simplicity of the sample } }