]> git.mxchange.org Git - friendica.git/blobdiff - src/Factory/LockFactory.php
Restructure Cache to follow new paradigm
[friendica.git] / src / Factory / LockFactory.php
index 6d739ea41acaf0c825700f19a7118dc1f4d8144f..2a54910d45f0ba5482c22308af7c2587893c8836 100644 (file)
@@ -1,9 +1,29 @@
 <?php
+/**
+ * @copyright Copyright (C) 2010-2021, the Friendica project
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
 namespace Friendica\Factory;
 
+use Friendica\Core\Cache\Factory\CacheFactory;
 use Friendica\Core\Cache\IMemoryCache;
-use Friendica\Core\Cache\Type;
+use Friendica\Core\Cache\Enum\Type;
 use Friendica\Core\Config\IConfig;
 use Friendica\Core\Lock;
 use Friendica\Database\Database;
@@ -103,7 +123,7 @@ class LockFactory
                        try {
                                return new Lock\SemaphoreLock();
                        } catch (\Exception $exception) {
-                               $this->logger->debug('Using Semaphore driver for locking failed.', ['exception' => $exception]);
+                               $this->logger->warning('Using Semaphore driver for locking failed.', ['exception' => $exception]);
                        }
                }
 
@@ -116,7 +136,7 @@ class LockFactory
                                        return new Lock\CacheLock($cache);
                                }
                        } catch (\Exception $exception) {
-                               $this->logger->debug('Using Cache driver for locking failed.', ['exception' => $exception]);
+                               $this->logger->warning('Using Cache driver for locking failed.', ['exception' => $exception]);
                        }
                }