Clicking on the "Regenerate" button from the gmap marker cache from the /admin/settings/gmap page does not reliably rebuild the marker cache, at least when using the cache_router module with the memcache engine.

The attached patch solves the problem, by making the following changes:

gmap_regenerate_markers()

  • Add a $reset parameter
  • Pass the $reset parameter to the gmap_get_icondata() function
  • Pass the $reset paramater to the gmap_set_marker_titles() function

gmap_set_marker_titles()

  • Simplify and correct the caching logic

gmap_flush_caches()

  • Add an implementation of hook_flush_caches to ensure that clicking on the "Clear cached data" button from the /admin/settings/performance page also rebuilds the marker cache.

Patch generated via "cvs diff" command relative to today's HEAD checkout.

CommentFileSizeAuthor
gmap-cache.diff2.73 KBpillarsdotnet

Comments

bdragon’s picture

Status: Needs review » Fixed

Committed, with changes.

There's no need to add a parameter to gmap_regenerate_markers, it's supposed to always do a full reset of stuff anyway.

Good call on the hook_flush_caches() change.

Logic cleanup seems fine.

Committed to HEAD. Committed to DRUPAL-5 as well, except for hook_flush_caches(), as that wasn't in 5.

http://drupal.org/cvs?commit=161355
http://drupal.org/cvs?commit=161357

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.