File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,31 @@ A little example:
137
137
<tag name="geocoder.dumper" alias="custom" />
138
138
</service>
139
139
` ` `
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
+
140
165
141
166
142
167
Reference Configuration
@@ -191,9 +216,9 @@ bazinga_geocoder:
191
216
# Caching Layer
192
217
cache:
193
218
provider: openstreetmaps
194
- cache: some_service_id
219
+ adapter: some_service_id
195
220
lifetime: 86400
196
- locale: %locale%
221
+ locale: %locale%
197
222
chain:
198
223
providers: [free_geo_ip, host_ip]
199
224
` ` `
You can’t perform that action at this time.
0 commit comments