NoLock.php 692 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace Illuminate\Cache;
  3. class NoLock extends Lock
  4. {
  5. /**
  6. * Attempt to acquire the lock.
  7. *
  8. * @return bool
  9. */
  10. public function acquire()
  11. {
  12. return true;
  13. }
  14. /**
  15. * Release the lock.
  16. *
  17. * @return bool
  18. */
  19. public function release()
  20. {
  21. return true;
  22. }
  23. /**
  24. * Releases this lock in disregard of ownership.
  25. *
  26. * @return void
  27. */
  28. public function forceRelease()
  29. {
  30. //
  31. }
  32. /**
  33. * Returns the owner value written into the driver for this lock.
  34. *
  35. * @return mixed
  36. */
  37. protected function getCurrentOwner()
  38. {
  39. return $this->owner;
  40. }
  41. }