diff --git a/src/Cache/SharedMemory.php b/src/Cache/SharedMemory.php index e96e66b..6fdb7be 100644 --- a/src/Cache/SharedMemory.php +++ b/src/Cache/SharedMemory.php @@ -65,8 +65,8 @@ public function attach($file = __FILE__) throw new \RuntimeException("file is not exists and it can not be created. file: {$file}"); } } - $key = ftok($file, 'a'); - $this->shm = shm_attach($key, $this->size); //allocate shared memory + + $this->shm = shm_attach(fileinode($file), $this->size); //allocate shared memory } /** @@ -173,4 +173,4 @@ public function __wakeup() { $this->attach(); } -} \ No newline at end of file +}