API Docs for: 0.8.0
Show:

CacheLockProvider Class

A lock provider that leverages the cache to create semaphores

Constructor

Item Index

Methods

Methods

acquire

(
  • name
  • [options={}]
  • cb
)

Attempts to acquire the lock with the given name.

Parameters:

  • name String
  • [options={}] Object optional
    • [payload] Object optional
    • [timeout] Integer optional
  • cb Function

get

(
  • name
  • cb
)

Retrieves the payload for the lock

Parameters:

  • name String
  • cb Function

release

(
  • name
  • [options={}]
  • cb
)

Releases the lock

Parameters:

  • name String
  • [options={}] Object optional
  • cb Function