Skip to content

grptx/express-http-cache-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cache Middleware

GitHub version

Install

yarn add express-http-cache-middleware

or

npm install express-http-cache-middleware

Usage

import { HttpCacheControl } from 'express-http-cache-middleware';
...
router.get(
            '/ping',
            HttpCacheControl.Etag(() => 'ping-tag'), // :string
            HttpCacheControl.MaxAge(() => 300), // :number 
            HttpCacheControl.LastModified(() => new Date()), // :Date
            RouteController.pingResult,
        );

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published