Tell us what you are trying to do?
setup maps caching
Is there any documentation that you are following?
toolset maps documentation
Is there a similar example that we can see?
no
What is the link to your site?
hidden link
My real question is this:
I have caching enabled on the website. However since the Corona outbreak this sites traffic has spiked . This has lead to google billing for the use of the API. What i wanted to know is how this works. I was under the assumption that 'Toolset maps' only connects to the API when data is entered, not when it is requested(through a page visit). Is this correct?
Also, people visit this site on the map to get cycling directions on their smartphone. Is this something that might cause the issue?
Since this i s a non-profit organisation the costs need to be limited.
I also see that the requests are centered around the maps javascript API
Hi, normally address caching is automatic and you don't need to do anything special. Most cases I've seen where caching is not working involve a MySQL version lower than 5.6, which is the minimum requirement for distance calculations: https://toolset.com/toolset-requirements/
What version of MySQL are you running on this server? If it's <5.6, an upgrade is probably required.
Hi Christian,
thank you for your reply. I think i haven't made my problem clear. It seems that cahcing is working, however i just wanted to check if the increase in API request is due to the increased traffic.
I was under the assumption that Toolset Maps only connects when data is entered. If this is so then i should not see the increased API calls right?
Or do i not understand it correctly and are there still API calls being made when a visitor visits the site and interacts with the map?
If the API calls are being made when a visitor uses a map i know there is nothing worng. However if API calls are only being made on data entry i might have to see what is going wrong.
Kind regards,
Glenn
Or do i not understand it correctly and are there still API calls being made when a visitor visits the site and interacts with the map?
Okay I misundertstood, sorry! Yes and no, there are multiple APIs to consider here. The JavaScript Maps API is hit every time a visitor loads a map on your site. That is normal, and these hits will continue to increase as traffic increases. There's nothing you can do here to cache these hits. The Geocoding API should only be hit once per location, when location data is entered. Then that data is cached for future use, so this number should not increase as traffic increases. It should increase as your site content grows. The Places API is typically used for autocomplete features, when someone types a location for search. This API traffic will continue to increase as traffic increases.
Hi Christian, thank you so much for your reply. Then it is set up properly. My client has to file her organisation as a non-profit so she can get a non-profit account for this initiative.
Kind regards,
Glenn