Nodejs Express framework caching

前端 未结 4 1294
悲&欢浪女
悲&欢浪女 2020-12-07 19:31

I am using Nodejs and Express Js. Also I add NowJS to the Express Js to do some real-time stuffs.

In the configuration file I have

app.configure(\'pr         


        
4条回答
  •  青春惊慌失措
    2020-12-07 19:40

    EDIT: I was wrong, see eug's comment below

    Connect includes caching middleware: http://senchalabs.github.com/connect/middleware-staticCache.html

    so it should be as easy as

    app.use(express.cache(...));
    app.use(express.static(...));
    

提交回复
热议问题