Geonames doesn't use unique/distinguishable prefix on cache entries
lyricnz - September 13, 2009 - 13:19
| Project: | GeoNames |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
This means that entries could collide with other modules, and it's impossible to delete just geonames data from the cache.

#1
Well... it does use:
<?php// search
'result_cache_prefix' => 'seares:',
'data_cache_prefix' => 'seadat:',
// postalcodecountryinfo
'result_cache_prefix' => 'pccires:',
'data_cache_prefix' => 'pccidat:',
// children
'result_cache_prefix' => 'hcres:',
'data_cache_prefix' => 'hcdat:',
// countrycode
'result_cache_prefix' => 'ccres:',
'data_cache_prefix' => 'ccdat:',
// countryinfo
'result_cache_prefix' => 'couires:',
'data_cache_prefix' => 'couidat:',
// countrysubdivision
'result_cache_prefix' => 'csres:',
'data_cache_prefix' => 'csdat:',
// gtopo30
'result_cache_prefix' => 'gtpres:',
'data_cache_prefix' => 'gtpdat:',
// hierarchy
'result_cache_prefix' => 'hires:',
'data_cache_prefix' => 'hidat:',
// nearbyplace
'result_cache_prefix' => 'neares:',
'data_cache_prefix' => 'neadat:',
// nearbypostalcodes
'result_cache_prefix' => 'nbpres:',
'data_cache_prefix' => 'nbpdat:',
// nearbywikipedia
'result_cache_prefix' => 'wikres:',
'data_cache_prefix' => 'wikdat:',
// neighbours
'result_cache_prefix' => 'hnres:',
'data_cache_prefix' => 'hndat:',
// postalcodesearch
'result_cache_prefix' => 'pcsres:',
'data_cache_prefix' => 'pcsdat:',
// siblings
'result_cache_prefix' => 'hsres:',
'data_cache_prefix' => 'hsdat:',
// srtm3
'result_cache_prefix' => 'strmres:',
'data_cache_prefix' => 'strmdat:',
// timezone
'result_cache_prefix' => 'tzres:',
'data_cache_prefix' => 'tzdat:',
// wikipediabbox
'result_cache_prefix' => 'wikbres:',
'data_cache_prefix' => 'wikbdat:',
// wikipediasearch
'result_cache_prefix' => 'wiksres:',
'data_cache_prefix' => 'wiksdat:',
?>
but these are pretty...nonobvious. Suggest each of these is prefixed by "geonames_"
#2
Also uses "geonames_countries".
#3
Fixed in 6.x-1.x-dev : http://drupal.org/cvs?commit=262334
Code in that change attempts to update any old cache entries to match the new prefix, but update.php flushes most caches anyway, so this is somewhat redundant (unless the user has created a new cache table, and not implemented hook_flush_caches.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.