Gathering detailed insights and metrics for upcache
Gathering detailed insights and metrics for upcache
Gathering detailed insights and metrics for upcache
Gathering detailed insights and metrics for upcache
Caching proxy dynamically configured by upstream applications
npm install upcache
Typescript
Module System
Node Version
NPM Version
JavaScript (83.95%)
Lua (13.41%)
Dockerfile (1.7%)
Makefile (0.93%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
16 Stars
432 Commits
1 Forks
2 Watchers
1 Branches
1 Contributors
Updated on Apr 09, 2025
Latest Version
2.8.2
Package Id
upcache@2.8.2
Unpacked Size
108.89 kB
Size
24.61 kB
File Count
45
NPM Version
9.2.0
Node Version
18.19.1
Published on
Apr 13, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
Caching proxy having cache keys configured by the upstream application, by setting http response headers.
Upcache has several ways of changing the cache keys:
Breaking change: server.d/upcache.conf is now server.d/upcache-memcached.conf
In debian/12 these packages are easy to install:
nginx
libnginx-mod-http-srcache-filter
libnginx-mod-http-set-misc
libnginx-mod-http-memc (if using memcached, or for running the test suite
memcached or redis
lua-resty-core
lua-resty-lrucache
a Node.js express app
The Node.js app need the module
1npm install upcache
The nginx configuration need the module
1luarocks install upcache
nginx is easily configured with the set of files described in (depending on
where npm installs the module) ./node_modules/upcache/nginx/README.md
.
Once installed, load appropriate helpers with
1const app = express(); 2const { tag, lock } = require('upcache'); 3const mlock = lock(config); 4 5app.get('/route', tag('ugc', 'global'), mlock.restrict('logged'), ...); 6app.post('/route', tag(), mlock.restrict('logged'), ...); 7
See README-tag.md and README-lock.md for documentation, and test/ for more examples.
Mind that srcache
module honours cache control headers - if the application
sends responses with Cache-Control: max-age=0
, the resource is not cached,
and tag().for()
is a facility for doing cache control.
To cache something, resources must be tagged, so lock/vary won't work without tag.
Upcache adds a X-Upcache: <version>
header to requests, so upstream application
can detect it is enabled, and which features are available.
A pre-configured nginx environment is available for testing a Node.js application that listens on port 3000, with nginx on port 3001 and memcached on port 3002, simply by launching (depending on ./node_modules/.bin being on PATH or not)
1npm run upcache
which also has an option for filtering output -g <regexp pattern>
.
mocha
relies on it for integration tests. No root permissions are needed.
See LICENSE file.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More