Asp.net 如何能像下面这段PHP代码一样, 实现整页缓存。
$this->key = $this_>template_page.$this->cache_id;
$memcache=memcache_connect(‘s-memcache’,11711);
$html=$memcache->get($this->key);
If($html!=false)
{
Echo $html;
Exit(1);
}
Do_some_db_query();
$html=$this->smary->fetch($this->template_page,$this->cache_id);
$memcache=memcache_connect(‘s-memcache’,11711);
$memcache->set($this->key,$html,MEMCACHE_COMPRESSED,$this-smary->cache_lifetime);;
Echo $thml;

解决方案 »

  1.   

    <%@ OutputCache Duration="3600" Location="Location="Any | Client | Downstream | Server | None " VaryByCustom="browser" VaryByParam="RequestID" %>
    如 <%@ OutputCache Duration="60" VaryByParam="none" %>
    ASP.NET缓存
      

  2.   


    这种方式能实现分布式缓存么?
    在PHP中,可以使用memcache实现分布式缓存!
      

  3.   

    第三方分布式缓存解决方案 Memcached和Cacheman 
      

  4.   


    我想知道的就是,如果利用memcached在Asp.net实现
    整页的分布式缓存?