8000 GitHub - depyronick/sliding-cache: A node in-memory cache helper that serves an object from cache as long as it requested within the specified time frame.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A node in-memory cache helper that serves an object from cache as long as it requested within the specified time frame.

License

Notifications You must be signed in to change notification settings

depyronick/sliding-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sliding-cache

A node in-memory cache helper that serves an object from cache as long as it requested within the specified time frame.

Usage

var SlidingCache = require('sliding-cache');
var slidingCache = new SlidingCache();

var liveDataSource = function(callback) {
	httprequestmodule.get(url, data, function(err, response) {
		if(!err) {
			callback(response.body);
		}
	});
}

slidingCache.Run('SOME_KEY_HERE', liveDataSource, function(data) {
    res.json(data);
}, 7000);

About

A node in-memory cache helper that serves an object from cache as long as it requested within the specified time frame.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0