Skip Navigation

Data Caching For Maps Addresses in WordPress

Google Maps and Azure Maps APIs have a limit on requests that a registered API key can perform. To reduce the number of requests, the Toolset Maps plugin stores address data as soon as possible.

In the case of the Types Address fields, the data is stored when the field is saved. When you use the Toolset Maps plugin, Views will cache every address that needs to be displayed on a map. There are two reasons for this:

  1. It allows Toolset Maps fast access to the latitude and longitude coordinates. This results in a much better timing than if it fetches the data directly from the Google Maps or Azure Maps APIs, every time the coordinates are needed.
  2. The Google Maps and Azure Maps APIs have a limit on requests coming from a registered API key. This limit is set per day, meaning that you could reach this limit quickly.

Inspecting and Removing the Stored Cached Data

Go to Toolset → Settings, click the Maps tab, scroll to the Cached data section, and click the Load stored data button. A list of all cached map data appears. The following image shows an example of the Cached data section stored data.

Caching Settings for the Toolset Maps plugin

You can delete each row individually. In the case of the Types Address fields, the data is stored when the field is saved.

Checking for Missing Cache Entries

Sometimes, the cache entries for maps might be missing. This could happen after importing addresses, glitches in maps API, etc. When this happens, Toolset can do a scan and restore the map cache.

To do this, go to Toolset Settings, click the Maps tab, scroll to the Cached data section, and click the Check for missing cache entries button.

Checking for missing map cache entries

Toolset will check the cache and if there are entries missing, it will immediately get them. If there are too many, Toolset will start a cron job. This will eventually get all missing cache entries, and then automatically disable itself.

Updated
Juli 22, 2021