Answered iterate over cache keys in shared cache

  • Monday, July 23, 2012 11:29 AM
     
     

    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?

All Replies

  • Monday, July 23, 2012 2:32 PM
     
     Proposed

    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



    • Proposed As Answer by Carlos Sardo Monday, July 23, 2012 2:32 PM
    • Edited by Carlos Sardo Monday, July 23, 2012 2:37 PM
    •  
  • Monday, July 23, 2012 3:50 PM
     
     

    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?

  • Tuesday, July 24, 2012 2:13 AM
    Moderator
     
     Answered

    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

  • Wednesday, August 01, 2012 1:44 PM
     
     
    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?
  • Saturday, August 04, 2012 12:02 PM
     
     
    I have seen no opportunity for this. Try to use the Cache Perview. It is even free.