Jamm\Memory\IMemoryStorage::read PHP Method

read() public method

Read data from memory storage
public read ( string | array $key, mixed &$ttl_left ) : mixed
$key string | array (string or array of string keys)
$ttl_left mixed = (ttl - time()) of key. Use to exclude dog-pile effect, with lock/unlock_key methods.
return mixed
    public function read($key, &$ttl_left = -1);

Usage Example

Example #1
0
 public function semaphore_exists()
 {
     $sem = $this->mem->read($this->key_semaphore);
     if (empty($sem)) {
         return false;
     }
     return true;
 }
All Usage Examples Of Jamm\Memory\IMemoryStorage::read