booty-cache

Dead sexy URL caching utility for Express/Connect

1 个版本
安装
npm install booty-cache
yarn add booty-cache
pnpm add booty-cache
bun add booty-cache
README

booty

Like a pirate's treasure booty, not the dirty kind of booty.

What it does

Dynamically cache routes in express!

npm install "git://github.com/balderdashy/booty.git"

How to use with Express

cacheRoute = require('booty')
 
app.get('/', cacheRoute(60*60), function(req, res) {
    res.send('This route is now cached for 3600 seconds!')
})

How to use with Sails

cacheRoute = require('booty')

var Controller = {
    route: cacheRoute(60*60)(function(req, res) {
        res.send('This route is now cached for 3600 seconds!')
    })
}
版本列表
0.0.1 2013-01-23