[ develop | DONE | ADDED] Cache: add a method to get info

This commit is contained in:
argirok 2024-02-15 12:13:04 +02:00
parent e8e4c410dd
commit 68662693a4
1 changed files with 4 additions and 0 deletions

View File

@ -116,6 +116,10 @@ app.get('/metrics', (req, res) => {
res.end(register.metrics());
});
app.get('/info', (req, res) => {
res.status(200).send(getResponse(200, {size:lruCache.size, keys: Array.from(lruCache.keys())}));
});
app.get('/get', cache(), cors(), (req, res) => {
setTimeout(() => {
const url = (req.query) ? req.query.url : null;