Simple C# ASP.NET Cache Implementation

前端 未结 3 1512
面向向阳花
面向向阳花 2020-12-17 01:29

I need to build up a List and cache the list and be able to append to it. I also need to be able to blow it away easily and recreate it. What is
3条回答
  •  轮回少年
    2020-12-17 02:03

    This Tutorial is what I found to be helpful

    • ASP.NET Caching Features

    Here is a sample

    List list = new List();
    
    Cache["ObjectList"] = list;                 // add
    list = ( List) Cache["ObjectList"]; // retrieve
    Cache.Remove("ObjectList");                 // remove
    
        

    提交回复
    热议问题