You are here

public function GeocoderPlugin::cache_get in Geocoder 7.2

Get a cache object based on the cache ID.

Parameters

string $cid: The cache ID of the data to retrieve.

Return value

\DrupalCacheInterface The cache object associated to the cache ID.

Overrides GeocoderPluginInterface::cache_get

See also

cache_set()

4 calls to GeocoderPlugin::cache_get()
Provider::geocode in src/Plugin/Geocoder/Provider.php
Geocode data
Provider::reverse in src/Plugin/Geocoder/Provider.php
Reverse geocode latitude and longitude.
Random::geocode in src/Plugin/Geocoder/Provider/Random.php
Geocode data
Random::reverse in src/Plugin/Geocoder/Provider/Random.php
Reverse geocode latitude and longitude.

File

src/Plugin/GeocoderPlugin.php, line 55
Contains \Drupal\geocoder\Plugin\GeocoderPlugin.

Class

GeocoderPlugin

Namespace

Drupal\geocoder\Plugin

Code

public function cache_get($cid) {
  if ((bool) Config::get('geocoder.cache', TRUE)) {
    if ($cache = cache_get($cid, 'cache_geocoder')) {
      return $cache->data;
    }
  }
  return FALSE;
}