You are here

function geocoder_cache_get in Geocoder 7

Retrieve a cached geocoded location.

Parameters

string $handler: The handler used to geocode this data.

mixed $data: The data used to fetch live geo data.

array $options: Handler-specific options that have effect on the result.

Return value

Geometry A Geometry object, FALSE (no result), or NULL (no cache).

2 calls to geocoder_cache_get()
geocoder in ./geocoder.module
The Geocoder API call.
geocoder_widget_get_field_value in ./geocoder.widget.inc
Get a field's value based on geocoded data.

File

./geocoder.module, line 359

Code

function geocoder_cache_get($handler, $data, $options) {
  $data = compact('handler', 'data', 'options');
  $cid = _geocoder_cache_cid($data);
  geophp_load();
  if ($cache = cache_get($cid, 'cache_geocoder')) {
    return $cache->data['geometry'];
  }
}