Skip Navigation

[Resolved] Automatically rebuild map cache using cron or call rebuild directly?

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 1 voice.

Last updated by Minesh 2 weeks, 4 days ago.

Assisted by: Minesh.

Author
Posts
#2814568

I am creating posts with an address field through Gravity Forms. I have the address and lat/long sent correctly to the post toolset address field. The problem is they do not show on the map after submission...
I can across this: https://toolset.com/errata/imported-posts-with-address-field-missing-from-view-result-that-includes-distance-filter/

I wanted to know if I can clear/rebuild the cache every time an entry is submitted or run it on a schedule.

Thank You!

#2814622

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is no automatic way, here is the Doc where there is a button given to check for missing cache entry for address:
- https://toolset.com/course-lesson/data-caching-for-maps-addresses/#checking-for-missing-cache-entries

Does that helps?

#2814631

Unfortunately, no, this does not help. I need to know how to trigger this automatically and the docs do not mention anything about that.

When I click that button, what action/hook is firing and can I trigger it on my own automatically without having to manually click it?

"If there are too many, Toolset will start a cron job. "
What is the name of the job? Can I just set up a recurring cron schedule for it to run every so often?

Thanks!

#2814721

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As per my further investigation, the action that is called when you click on the button "Check for missing cache entires" is "wpv_maps_check_missing_cache".

You can find reference related to action within the following file where you can see the CRON related information as well.
=> plugins\toolset-maps\includes\toolset-maps-views.class.php

As stated with our Doc:
=> https://toolset.com/course-lesson/data-caching-for-maps-addresses/#checking-for-missing-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.

Lets say when you click on the button "Check for missing cache entires" and there were 500 missing address found then it will process the 50 and for remaining it will start the CRON that will run every hour and process another 50 records.