From ddb5009040d0404c06b23ad9be2f521ed540adbc Mon Sep 17 00:00:00 2001 From: Erick Hitter <services@ethitter.com> Date: Sun, 28 Aug 2016 00:51:52 -0700 Subject: [PATCH] Lower cache lives --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 709c1dc..540a08b 100755 --- a/server.js +++ b/server.js @@ -83,7 +83,7 @@ function disconnectAndClear( lockName ) { */ // Endpoint to check lock status -app.get( '/api/status/:lock_name', cache( '15 seconds' ), function( req, res ) { +app.get( '/api/status/:lock_name', cache( '5 seconds' ), function( req, res ) { // Parse allowed request arguments var lock = getLockInstance( req.params.lock_name ); if ( ! lock ) { @@ -111,7 +111,7 @@ app.get( '/api/status/:lock_name', cache( '15 seconds' ), function( req, res ) { } ); // Endpoint to change lock state -app.get( '/api/:lock_action(lock|unlock)/:lock_name', cache( '5 seconds' ), function( req, res ) { +app.get( '/api/:lock_action(lock|unlock)/:lock_name', cache( '3 seconds' ), function( req, res ) { // Parse allowed request arguments var action = req.params.lock_action, allowedActions = [ 'unlock', 'lock' ]; -- GitLab