locked
How to get a collection of Cache RRS feed

  • Question

  • Hi,

    I have a web application in sharepoint where i have used cache in different user controls. Now i want to develop a module where i can fetch all of these Cache Objects and operate them in a loop.

     

    Any suggestions...


    Shrikant Datke SharePoint Server 2010 MCITP| Developer| Administrator Blog: http://shrikantdatke.blogspot.com
    • Moved by Reed Copsey, JrMVP Monday, August 29, 2011 5:02 PM Off topic (From:Visual C# Language)
    Tuesday, August 23, 2011 10:07 AM

Answers

  • For all ASP.NET web application development question please use ASP.NET forums.

    http://forums.asp.net

    The Cache class implements IEnumerable so you should be able to do

    for each (var obj in Cache)
    {

    }

    • Marked as answer by Shrikant Datke Tuesday, August 23, 2011 11:35 AM
    Tuesday, August 23, 2011 10:58 AM

All replies

  • Hi,

    Try perhaps an ASP.NET or a SharePoint programming group. Also "caching" is really vague. Some more context could help. Do you cache some data ? Do you cache the HTML generated for a control ? Have you tried just to see the documentation for the Cache type you are using (perhaps http://msdn.microsoft.com/en-us/library/system.web.caching.cache.aspx ?) What have you tried ? It doesn't work with a for or foreach loop ?


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".
    Tuesday, August 23, 2011 10:56 AM
  • For all ASP.NET web application development question please use ASP.NET forums.

    http://forums.asp.net

    The Cache class implements IEnumerable so you should be able to do

    for each (var obj in Cache)
    {

    }

    • Marked as answer by Shrikant Datke Tuesday, August 23, 2011 11:35 AM
    Tuesday, August 23, 2011 10:58 AM
  • Thanks Andreas..

    I will work on this and will tell you about the results.

     

     


    Shrikant Datke SharePoint Server 2010 MCITP| Developer| Administrator Blog: http://shrikantdatke.blogspot.com
    Tuesday, August 23, 2011 11:22 AM