memcached = $memcached; } /** * Attempt to acquire the lock. * * @return bool */ public function acquire() { return $this->memcached->add( $this->name, 1, $this->seconds ); } /** * Release the lock. * * @return void */ public function release() { $this->memcached->delete($this->name); } }