Coffeehouse Post

Single Post Permalink

View Thread: Cannot get "Show Me The Cache" Achievement to work
  • User profile image
    cbae

    , AceHack wrote

    *snip*

    1
    2
    3
    4
    5
    6
    7
    DataCacheFactoryConfiguration config = new DataCacheFactoryConfiguration("default");
    DataCacheFactory cacheFactory = new DataCacheFactory(config);
    DataCache defaultCache = cacheFactory.GetDefaultCache();
     
    defaultCache.Put("testkey", "testobject");
    string strObject = (string)defaultCache.Get("testkey");
    defaultCache.Remove("testkey");

    Maybe the compiler is smart enough to reduce the last three lines to:

    var strObject = "testobject";