File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,6 +137,31 @@ A little example:
137137 <tag name="geocoder.dumper" alias="custom" />
138138</service>
139139` ` `
140+ Cache Provider
141+ ---------------
142+
143+ Sometimes you have to cache the results from a provider. For this case the bundle provides
144+ a cache provider. The cache provider wraps another provider and delegate all calls
145+ to this provider and cache the return value.
146+
147+ __Configuration example:__
148+
149+ ` ` ` yaml
150+ services:
151+ acme_cache_adapter:
152+ class: "Doctrine\C ommon\C ache\A pcCache"
153+
154+ bazinga_geocoder:
155+ providers:
156+ cache:
157+ adapter: acme_cache_adapter
158+ provider: google_maps
159+ google_maps: ~
160+ ` ` `
161+
162+ > Tip: If you want to configure the cache adapter,
163+ > we recommend the [liip/doctrine-cache-bundle](https://github.com/liip/LiipDoctrineCacheBundle.git).
164+
140165
141166
142167Reference Configuration
@@ -191,9 +216,9 @@ bazinga_geocoder:
191216 # Caching Layer
192217 cache:
193218 provider: openstreetmaps
194- cache: some_service_id
219+ adapter: some_service_id
195220 lifetime: 86400
196- locale: %locale%
221+ locale: %locale%
197222 chain:
198223 providers: [free_geo_ip, host_ip]
199224` ` `
You can’t perform that action at this time.
0 commit comments