League\Geotools\Cache\Redis::cache PHP Method

cache() public method

{@inheritDoc}
public cache ( League\Geotools\Batch\BatchGeocoded $geocoded )
$geocoded League\Geotools\Batch\BatchGeocoded
    public function cache(BatchGeocoded $geocoded)
    {
        $this->redis->set($key = $this->getKey($geocoded->getProviderName(), $geocoded->getQuery()), $this->serialize($geocoded));
        if ($this->expire > 0) {
            $this->redis->expire($key, $this->expire);
        }
    }