src/Psr16/FileSystemCacheEngine.php
public function lock($key)
    {
        $this->logger->info("[Filesystem cache] Lock '$key'");

        $lockFile = $this->fixKey($key) . ".lock";

        try {
            file_put_contents($lockFile, date('c'));
        } catch (Exception $ex) {
            // Ignoring... Set will cause an error
        }
    }
public function lock($key)
    {
        $this->logger->info("[Filesystem cache] Lock '$key'");

        $lockFile = $this->fixKey($key) . ".lock";

        try {
            file_put_contents($lockFile, date('c'));
        } catch (Exception $ex) {
            // Ignoring... Set will cause an error
        }
    }
public function lock ( $ key ) { $ this -> logger -> info ( "[Filesystem cache] Lock '$key'" ) ; $ lockFile = $ this -> fixKey ( $ key ) . ".lock" ; try { file_put_contents ( $ lockFile , date ( 'c' ) ) ; } catch ( Exception $ ex ) { // Ignoring... Set will cause an error } }
Lock resource before set it.
@param string $key
Lock resource before set it .