From dbcc45408eab2fa6625cb44a86bf867ef31adf24 Mon Sep 17 00:00:00 2001 From: Khaled AbuShqear Date: Tue, 17 Sep 2024 18:55:13 +0300 Subject: [PATCH] apply feedback --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 89075c1f0..1871c4502 100644 --- a/README.md +++ b/README.md @@ -376,6 +376,9 @@ Geocoder::Lookup.all_services.each{|service| Geocoder::Lookup.get(service).cache Do *not* include the prefix when passing a URL to be expired. Expiring `:all` will only expire keys with the configured prefix -- it will *not* expire every entry in your key/value store. +In addition to conventional cache stores like Redis, it's possible to keep your cache in the database using `ActiveRecord`. For example see [this gist](https://gist.github.com/shqear93/4b07153b4ca7e4e4a41da492679f6c0e). + + _Before you implement caching in your app please be sure that doing so does not violate the Terms of Service for your geocoding service._ @@ -511,13 +514,6 @@ If you store multiple sets of coordinates for each object, you can specify latit Venue.near("Paris", 50, latitude: :secondary_latitude, longitude: :secondary_longitude) ``` -Use ActiveRecord as cache -------------------------- - -This applies for ActiveRecord only, the default cache service is Redis, but we still can use Database instead, it is not -recommended in usual cases, but you can still follow -[this gist](https://gist.github.com/shqear93/4b07153b4ca7e4e4a41da492679f6c0e) to use databases as caching storage - ### Distance and Bearing When you run a geospatial query, the returned objects have two attributes added: