]> git.mxchange.org Git - friendica-addons.git/commitdiff
[openstreetmap] Fix references to Cache
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 12 Jan 2020 14:36:43 +0000 (09:36 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 12 Jan 2020 14:36:43 +0000 (09:36 -0500)
openstreetmap/openstreetmap.php

index c2c0a7c9af54d2a9341d77dd0f5cb5dacc0fab34..6192b93f6c49cfc6892a399affb1c3dd3b5c921b 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 use Friendica\DI;
-use Friendica\Core\Cache;
+use Friendica\Core\Cache\Cache;
 use Friendica\Core\Config;
 use Friendica\Core\Hook;
 use Friendica\Core\L10n;
@@ -131,13 +131,13 @@ function openstreetmap_get_coordinates($a, &$b)
        $args = '?q=' . urlencode($b['location']) . '&format=json';
 
        $cachekey = "openstreetmap:" . $b['location'];
-       $j = Cache::get($cachekey);
+       $j = DI::cache()->get($cachekey);
 
        if (is_null($j)) {
                $curlResult = Network::curl($nomserver . $args);
                if ($curlResult->isSuccess()) {
                        $j = json_decode($curlResult->getBody(), true);
-                       Cache::set($cachekey, $j, Cache::MONTH);
+                       DI::cache()->set($cachekey, $j, Cache::MONTH);
                }
        }