Site Feedback Thread

15 posts

Cannot get "Show Me The Cache" Azure Achievement to work

Back to Forum: Site Feedback
  • AceHack

    I followed the guide here:

    http://www.windowsazure.com/en-us/develop/net/how-to-guides/cache/

    exactly and my cache is working as expected I am able to store and retrieve data so why has the achievement not shown up?  The azure account I am connecting to is my companies and has been around for a while.  I'm assuming there is something in VS that should be triggering this but it is not.  Thanks.

  • AceHack

    Any idea what's going on here?  Thanks.

  • karstenj

    What's your <dataCacheClient> node look like?

    BTW, you are getting very close to getting them all!

  • AceHack

        <dataCacheClient name="default">
          <hosts>
            <host name="***.cache.windows.net" cachePort="22233" />
          </hosts>
          <securityProperties mode="Message">
            <messageSecurity authorizationInfo="***"></messageSecurity>
          </securityProperties>
        </dataCacheClient>
    

     

    And it's in my web.config of a WCF Cloud Service Project that is successfully hosted in Azure and working with the cache.  I have also debugged locally this project and stepped over the lines that read and write to the cache and it is working as expected.

  • AceHack

    Here is my code using the Cache that IS working

            string GetCache()
            {
                DataCacheFactory cacheFactory = new DataCacheFactory();
                DataCache cache = cacheFactory.GetDefaultCache();
                cache.Put("item", "value");
                var r = (string)cache.Get("item");
                return r;
            }
    

  • AceHack

    Okay this is the last one I need to get and then I have all of them so please help.   Thanks.

  • AceHack

    @karstenj Any suggestions?  Thanks.

  • AceHack

    Okay I'm using version 3.0 and this Achievement still does not pop.  What's the deal!!!

    Using Azure SDK October 2012 and here is my code

    DataCache cache = new DataCache("default");
    cache.Add("item", "value");
    var value = cache.Get("item");
    cache.Remove("item"); 
    

    The code works.

    PLEASE HELP!!!

  • AceHack

    @karstenj:Okay so I've been able to get every other achievement including the new windows 8 ones but this one just will not work.  Please someone help!!!  Thanks.

  • Duncanma

    @AceHack: We'll take a look at this AceHack, I'd have to dig into the achievements code to figure it out, so the safest bet is for me to just get Karsten back on this. Hang tight!

  • karstenj

    @AceHack -- Weird. The achievement gets fired based on your app.config or web.config looking at the dataCacheClient node. According to what you posted in May on this thread, it should have unlocked. Is that still what your dataCacheClient config looks like? 

  • BursaChat
  • AceHack

    Still can't git it.  Please Help!!!

    <dataCacheClients>
        <dataCacheClient name="default">
          <hosts>
            <host name="xxx.cache.windows.net" cachePort="22233" />
          </hosts>
          <securityProperties mode="Message">
            <messageSecurity authorizationInfo="[xxx]"></messageSecurity>
          </securityProperties>
        </dataCacheClient>
        <dataCacheClient name="SslEndpoint">
          <hosts>
            <host name="xxx.cache.windows.net" cachePort="22243" />
          </hosts>
          <securityProperties mode="Message" sslEnabled="true">
            <messageSecurity authorizationInfo="[xxx]"></messageSecurity>
          </securityProperties>
        </dataCacheClient>
      </dataCacheClients>
    

    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");
    

  • AceHack

    Hey got it.  Thanks for all your help.

  • karstenj

    yeah!

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.