Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.

Answered iterate over cache keys in shared cache

  • 2012年7月23日 11:29
     
     

    Is it possible to iterate over the cache keys in Shared Cache?

    Does the number of regions influence the performance of the shared cache? ie. can I have a 1-2000 regions without performance degradation?

すべての返信

  • 2012年7月23日 14:32
     
     回答の候補

    Hi ladeak,

    If you take a look at the DataCache Members MSDN page you can see that it does have methods that enables you to iterate through your cache (shared or not):

    public method GetObjectsByAllTags Gets an enumerable list of all cached objects in the specified region that have all the same tags in common.
    public method GetObjectsByAnyTag Gets an enumerable list of all cached objects in the specified region that have any of the same tags in common.
    public method GetObjectsByTag Gets an enumerable list of all cached objects in the specified region that have the specified tag.
    public method GetObjectsInRegion Gets an enumerable list of all cached objects in the specified region.

    There are performance considerations when using BulkGet, although it doesn't mention anything about multiple regions affecting performance.

    Hope this helps!


    Cheers, Carlos Sardo



  • 2012年7月23日 15:50
     
     

    And by intelisens you also get:

    Summary:
    //     Gets an enumerable list of all cached objects in the specified region that
    //     have all the same tags in common. Applies to Windows Server AppFabric only.

    Are there any constraints for the number of regions?

  • 2012年7月24日 2:13
    モデレータ
     
     回答済み

    Hi,

    I suggest you look at this article with Azure Cache Regions and Tagging:

    http://msdn.microsoft.com/en-us/library/windowsazure/hh914155.aspx

    Hope this helps.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

  • 2012年8月1日 13:44
     
     
    The article posted specifically says that it does not apply to shared cache. Is there a way to either iterate or simply get all items in a shared cache?
  • 2012年8月4日 12:02
     
     
    I have seen no opportunity for this. Try to use the Cache Perview. It is even free.