怎么样在struts1里面使用oscache提高页面访问速度,就是在action里面怎么进行oscache操作

解决方案 »

  1.   

    oscache这没听过,看来我还是做的项目太少了
    先顶下楼主了。
      

  2.   

    oscache 主要是搞页面缓存的技术.
    局部缓存:<%@taglib uri="http://www.opensymphony.com/oscache" prefix=“oscache"%>
    <oscache:cache>
    <%=new Date() %>
    </oscache:cache>
    全局缓存:<filter>
        <filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class>
        <init-param>
            <param-name>time</param-name>
            <param-value>7200</param-value>
        </init-param>
        <init-param>
            <param-name>scope</param-name>
            <param-value>application</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>CacheFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>