Skip to content
Snippets Groups Projects
Verified Commit ddb50090 authored by Erick Hitter's avatar Erick Hitter
Browse files

Lower cache lives

parent aa8e3e7f
Branches
Tags
No related merge requests found
...@@ -83,7 +83,7 @@ function disconnectAndClear( lockName ) { ...@@ -83,7 +83,7 @@ function disconnectAndClear( lockName ) {
*/ */
// Endpoint to check lock status // 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 // Parse allowed request arguments
var lock = getLockInstance( req.params.lock_name ); var lock = getLockInstance( req.params.lock_name );
if ( ! lock ) { if ( ! lock ) {
...@@ -111,7 +111,7 @@ app.get( '/api/status/:lock_name', cache( '15 seconds' ), function( req, res ) { ...@@ -111,7 +111,7 @@ app.get( '/api/status/:lock_name', cache( '15 seconds' ), function( req, res ) {
} ); } );
// Endpoint to change lock state // 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 // Parse allowed request arguments
var action = req.params.lock_action, var action = req.params.lock_action,
allowedActions = [ 'unlock', 'lock' ]; allowedActions = [ 'unlock', 'lock' ];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment